From: "Tomas M." <tmezzadra@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
deepthi@linux.vnet.ibm.com, 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>,
Len Brown <lenb@kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ferenc Wagner <wferi@niif.hu>
Subject: Re: [bisected][bug] commit e978aa7d7d57d04eb5f88 breaks suspend on laptop.
Date: Sat, 12 Nov 2011 10:21:48 -0300 [thread overview]
Message-ID: <4EBE72EC.5010902@gmail.com> (raw)
In-Reply-To: <201111120250.14151.rjw@sisk.pl>
Yes, it was acpi_idle, and the proposed patch fixed the problem.
On 11/11/2011 10:50 PM, Rafael J. Wysocki wrote:
> On Saturday, November 12, 2011, Rafael J. Wysocki wrote:
>> On Friday, November 11, 2011, Tomas M. wrote:
>>> yes, that helps.
>> What does "cat /sys/devices/system/cpu/cpuidle/current_driver" show?
> If that's "acpi_idle", the appended patch should help (it works for
> me at least).
>
> Thanks,
> Rafael
>
> ---
> From: Rafael J. Wysocki<rjw@sisk.pl>
> Subject: ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)
>
> 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 purpose (it's racy and doesn't really provide any real
> protection), so it can be removed, which makes the problem go away.
>
> 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,
next prev parent reply other threads:[~2011-11-12 13:22 UTC|newest]
Thread overview: 16+ 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
2011-11-12 13:21 ` Tomas M. [this message]
2011-11-12 22:14 ` [bisected][bug] commit e978aa7d7d57d04eb5f88 breaks suspend on laptop Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2011-11-12 3:41 Arnd Bergmann
2011-11-12 22:25 ` Rafael J. Wysocki
2011-11-12 23:49 ` Linus Torvalds
2011-11-13 0:18 ` 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=4EBE72EC.5010902@gmail.com \
--to=tmezzadra@gmail.com \
--cc=arjan@infradead.org \
--cc=arjan@linux.intel.com \
--cc=deepthi@linux.vnet.ibm.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=torvalds@linux-foundation.org \
--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