From: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Len Brown <lenb@kernel.org>, Ferenc Wagner <wferi@niif.hu>,
"Tomas M." <tmezzadra@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
g.trinabh@gmail.com, j-pihet@ti.com, khilman@ti.com,
arjan@linux.intel.com, len.brown@intel.com,
Arjan van de Ven <arjan@infradead.org>,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)
Date: Mon, 14 Nov 2011 16:34:05 +0530 [thread overview]
Message-ID: <4EC0F5A5.7070304@linux.vnet.ibm.com> (raw)
In-Reply-To: <201111122317.27576.rjw@sisk.pl>
Thanks a lot Ferenc and Tomas for reporting the problem and testing the fix.
Thanks a ton Rafael for plugging the bug with an amazing turn around time !!
-- Deepthi
On Sunday 13 November 2011 03:47 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> After commit e978aa7d7d57d04eb5f88a7507c4fb98577def77 (cpuidle: Move
> dev->last_residency update to driver enter routine; remove
> dev->last_state) setting acpi_idle_suspend to 1 by
> acpi_processor_suspend() causes the ACPI cpuidle routines to return
> error codes continuously, which in turn causes cpuidle to lock up
> (hard). However, acpi_idle_suspend doesn't appear to be useful for
> any particular purpose (it's racy and doesn't really provide any real
> protection), so it can be removed, which makes the problem go away.
>
> Reported-and-tested-by: Tomas M. <tmezzadra@gmail.com>
> Reported-and-tested-by: Ferenc Wagner <wferi@niif.hu>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/acpi/processor_idle.c | 29 -----------------------------
> 1 file changed, 29 deletions(-)
>
> Index: linux/drivers/acpi/processor_idle.c
> ===================================================================
> --- linux.orig/drivers/acpi/processor_idle.c
> +++ linux/drivers/acpi/processor_idle.c
> @@ -224,7 +224,6 @@ static void lapic_timer_state_broadcast(
> /*
> * Suspend / resume control
> */
> -static int acpi_idle_suspend;
> static u32 saved_bm_rld;
>
> static void acpi_idle_bm_rld_save(void)
> @@ -243,21 +242,13 @@ static void acpi_idle_bm_rld_restore(voi
>
> int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
> {
> - if (acpi_idle_suspend == 1)
> - return 0;
> -
> acpi_idle_bm_rld_save();
> - acpi_idle_suspend = 1;
> return 0;
> }
>
> int acpi_processor_resume(struct acpi_device * device)
> {
> - if (acpi_idle_suspend == 0)
> - return 0;
> -
> acpi_idle_bm_rld_restore();
> - acpi_idle_suspend = 0;
> return 0;
> }
>
> @@ -763,13 +754,6 @@ static int acpi_idle_enter_c1(struct cpu
>
> local_irq_disable();
>
> - /* Do not access any ACPI IO ports in suspend path */
> - if (acpi_idle_suspend) {
> - local_irq_enable();
> - cpu_relax();
> - return -EINVAL;
> - }
> -
> lapic_timer_state_broadcast(pr, cx, 1);
> kt1 = ktime_get_real();
> acpi_idle_do_entry(cx);
> @@ -810,13 +794,6 @@ static int acpi_idle_enter_simple(struct
>
> local_irq_disable();
>
> - if (acpi_idle_suspend) {
> - local_irq_enable();
> - cpu_relax();
> - return -EINVAL;
> - }
> -
> -
> if (cx->entry_method != ACPI_CSTATE_FFH) {
> current_thread_info()->status &= ~TS_POLLING;
> /*
> @@ -895,12 +872,6 @@ static int acpi_idle_enter_bm(struct cpu
> if (unlikely(!pr))
> return -EINVAL;
>
> -
> - if (acpi_idle_suspend) {
> - cpu_relax();
> - return -EINVAL;
> - }
> -
> if (!cx->bm_sts_skip && acpi_idle_bm_check()) {
> if (drv->safe_state_index >= 0) {
> return drv->states[drv->safe_state_index].enter(dev,
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2011-11-14 11:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 16:01 [bisected][bug] commit e978aa7d7d57d04eb5f88 breaks suspend on laptop Tomas M.
2011-11-11 20:46 ` Tomas M.
2011-11-11 21:26 ` Rafael J. Wysocki
2011-11-11 21:34 ` Tomas M.
2011-11-12 0:41 ` Rafael J. Wysocki
2011-11-12 1:50 ` Rafael J. Wysocki
2011-11-12 12:45 ` Ferenc Wagner
2011-11-12 22:14 ` Rafael J. Wysocki
2011-11-12 22:17 ` [PATCH] ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression) Rafael J. Wysocki
2011-11-14 11:04 ` Deepthi Dharwar [this message]
2011-11-12 13:21 ` [bisected][bug] commit e978aa7d7d57d04eb5f88 breaks suspend on laptop Tomas M.
2011-11-12 22:14 ` Rafael J. Wysocki
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=4EC0F5A5.7070304@linux.vnet.ibm.com \
--to=deepthi@linux.vnet.ibm.com \
--cc=arjan@infradead.org \
--cc=arjan@linux.intel.com \
--cc=g.trinabh@gmail.com \
--cc=j-pihet@ti.com \
--cc=khilman@ti.com \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=tmezzadra@gmail.com \
--cc=wferi@niif.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox