From: Len Brown <lenb@kernel.org>
To: akpm@linux-foundation.org
Cc: linux-acpi@vger.kernel.org, venkatesh.pallipadi@intel.com,
larry.finger@lwfinger.net
Subject: Re: [patch 1/4] cuidle: fix boot hang
Date: Wed, 28 Mar 2007 22:57:10 -0400 [thread overview]
Message-ID: <200703282257.10852.lenb@kernel.org> (raw)
In-Reply-To: <200703270538.l2R5ckE5007930@shell0.pdx.osdl.net>
Applied
(and cpuidle branch restored to acpi-test tree)
thanks,
-Len
On Tuesday 27 March 2007 01:38, akpm@linux-foundation.org wrote:
> From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
> Patch for cpuidle boot hang reported by Larry Finger here.
> http://www.ussg.iu.edu/hypermail/linux/kernel/0703.2/2025.html
>
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> Cc: Len Brown <lenb@kernel.org>
> Cc: Larry Finger <larry.finger@lwfinger.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/cpuidle/cpuidle.c | 26 +++++++++++++++++++-------
> drivers/cpuidle/driver.c | 4 ++--
> 2 files changed, 21 insertions(+), 9 deletions(-)
>
> diff -puN drivers/cpuidle/cpuidle.c~cpuidle-fix-boot-hang drivers/cpuidle/cpuidle.c
> --- a/drivers/cpuidle/cpuidle.c~cpuidle-fix-boot-hang
> +++ a/drivers/cpuidle/cpuidle.c
> @@ -119,6 +119,7 @@ static int cpuidle_add_device(struct sys
>
> dev = &per_cpu(cpuidle_devices, cpu);
>
> + dev->cpu = cpu;
> mutex_lock(&cpuidle_lock);
> if (cpu_is_offline(cpu)) {
> mutex_unlock(&cpuidle_lock);
> @@ -129,15 +130,26 @@ static int cpuidle_add_device(struct sys
> mutex_unlock(&cpuidle_lock);
> return 0;
> }
> - dev->status |= CPUIDLE_STATUS_DETECTED;
> - list_add(&dev->device_list, &cpuidle_detected_devices);
> - cpuidle_add_sysfs(sys_dev);
> - if (cpuidle_curr_driver)
> - cpuidle_attach_driver(dev);
> - if (cpuidle_curr_governor)
> - cpuidle_attach_governor(dev);
> + if (cpuidle_curr_driver) {
> + if (cpuidle_attach_driver(dev))
> + goto err_ret;
> + }
> +
> + if (cpuidle_curr_governor) {
> + if (cpuidle_attach_governor(dev)) {
> + cpuidle_detach_driver(dev);
> + goto err_ret;
> + }
> + }
> +
> if (cpuidle_device_can_idle(dev))
> cpuidle_install_idle_handler();
> +
> + list_add(&dev->device_list, &cpuidle_detected_devices);
> + cpuidle_add_sysfs(sys_dev);
> + dev->status |= CPUIDLE_STATUS_DETECTED;
> +
> +err_ret:
> mutex_unlock(&cpuidle_lock);
>
> return 0;
> diff -puN drivers/cpuidle/driver.c~cpuidle-fix-boot-hang drivers/cpuidle/driver.c
> --- a/drivers/cpuidle/driver.c~cpuidle-fix-boot-hang
> +++ a/drivers/cpuidle/driver.c
> @@ -37,8 +37,8 @@ int cpuidle_attach_driver(struct cpuidle
> ret = cpuidle_curr_driver->init(dev);
> if (ret) {
> module_put(cpuidle_curr_driver->owner);
> - printk(KERN_ERR "cpuidle: driver %s failed to attach to cpu %d\n",
> - cpuidle_curr_driver->name, dev->cpu);
> + printk(KERN_INFO "cpuidle: driver %s failed to attach to "
> + "cpu %d\n", cpuidle_curr_driver->name, dev->cpu);
> } else {
> if (dev->status & CPUIDLE_STATUS_GOVERNOR_ATTACHED)
> cpuidle_rescan_device(dev);
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2007-03-29 2:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-27 5:38 [patch 1/4] cuidle: fix boot hang akpm
2007-03-29 2:57 ` Len Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703282257.10852.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=larry.finger@lwfinger.net \
--cc=linux-acpi@vger.kernel.org \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.