* Re: [PATCH 2/2] ACPICA: hw: Don't carry spinlock over suspend
2007-10-01 20:38 ` [PATCH 2/2] ACPICA: hw: Don't carry spinlock over suspend Rafael J. Wysocki
@ 2007-10-01 20:27 ` Alexey Starikovskiy
0 siblings, 0 replies; 4+ messages in thread
From: Alexey Starikovskiy @ 2007-10-01 20:27 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Alexey Starikovskiy, Linux-acpi, Len Brown
Rafael J. Wysocki wrote:
> On Sunday, 30 September 2007 20:39, Alexey Starikovskiy wrote:
>> ACPI uses acpi_get_register() in order to get into suspend.
>> This function is guarded by acpi_gbl_hardware_lock, which will be carried
>> into resume phase.
>> At resume interrupts are enabled and first ACPI interrupt deadlocks on this
>> lock.
>
> Ouch. That might have bitten quite some people, I guess.
>
>> Solution seems to be to not lock register read, as there are no concurrent
>> activity at this point.
>>
>> Reference: http://bugzilla.kernel.org/show_bug.cgi?id=7499
>>
>> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
>
> Do you think it's -stable material?
Seem to be trivial.
Regards,
Alex.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ACPICA: hw: Don't carry spinlock over suspend
[not found] ` <20070930183942.32654.16220.stgit@samsung>
@ 2007-10-01 20:38 ` Rafael J. Wysocki
2007-10-01 20:27 ` Alexey Starikovskiy
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2007-10-01 20:38 UTC (permalink / raw)
To: Alexey Starikovskiy; +Cc: Linux-acpi, Len Brown
On Sunday, 30 September 2007 20:39, Alexey Starikovskiy wrote:
> ACPI uses acpi_get_register() in order to get into suspend.
> This function is guarded by acpi_gbl_hardware_lock, which will be carried
> into resume phase.
> At resume interrupts are enabled and first ACPI interrupt deadlocks on this
> lock.
Ouch. That might have bitten quite some people, I guess.
> Solution seems to be to not lock register read, as there are no concurrent
> activity at this point.
>
> Reference: http://bugzilla.kernel.org/show_bug.cgi?id=7499
>
> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Do you think it's -stable material?
Greetings,
Rafael
> ---
>
> drivers/acpi/hardware/hwsleep.c | 3 ++-
> include/acpi/acpixf.h | 2 ++
> 2 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
> index 4d0c677..c0577ca 100644
> --- a/drivers/acpi/hardware/hwsleep.c
> +++ b/drivers/acpi/hardware/hwsleep.c
> @@ -398,7 +398,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
> /* Wait until we enter sleep state */
>
> do {
> - status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value);
> + status = acpi_get_register_unlocked(ACPI_BITREG_WAKE_STATUS,
> + &in_value);
> if (ACPI_FAILURE(status)) {
> return_ACPI_STATUS(status);
> }
> diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
> index 3d7ab9e..9512f04 100644
> --- a/include/acpi/acpixf.h
> +++ b/include/acpi/acpixf.h
> @@ -314,6 +314,8 @@ acpi_resource_to_address64(struct acpi_resource *resource,
> */
> acpi_status acpi_get_register(u32 register_id, u32 * return_value);
>
> +acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value);
> +
> acpi_status acpi_set_register(u32 register_id, u32 value);
>
> acpi_status
>
> -
> 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
>
>
--
"Premature optimization is the root of all evil." - Donald Knuth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ACPICA: hw: Don't carry spinlock over suspend
@ 2007-10-02 4:07 Andrey Borzenkov
2007-10-02 15:59 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2007-10-02 4:07 UTC (permalink / raw)
To: Rafael J. Wysocki, linux-api, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]
> On Sunday, 30 September 2007 20:39, Alexey Starikovskiy wrote:
> > ACPI uses acpi_get_register() in order to get into suspend.
> > This function is guarded by acpi_gbl_hardware_lock, which will be carried
> > into resume phase.
> > At resume interrupts are enabled and first ACPI interrupt deadlocks on
> > this lock.
>
> Ouch. That might have bitten quite some people, I guess.
>
> > Solution seems to be to not lock register read, as there are no
> > concurrent activity at this point.
> >
> > Reference: http://bugzilla.kernel.org/show_bug.cgi?id=7499
> >
> > Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
>
> Do you think it's -stable material?
As someone who *has* been bitten by this bug - by all means.
I'd like to emphasize one more point - we were able to debug it only because
old kernel at least displayed debug messages. Current kernel deadlocks
absolutely dead (pun intended). No output to console, no indication what
happens. I consider this regression. If at all possible, we should make sure
that console output is available as early as possible.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ACPICA: hw: Don't carry spinlock over suspend
2007-10-02 4:07 Andrey Borzenkov
@ 2007-10-02 15:59 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2007-10-02 15:59 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: linux-api, linux-kernel
On Tuesday, 2 October 2007 06:07, Andrey Borzenkov wrote:
> > On Sunday, 30 September 2007 20:39, Alexey Starikovskiy wrote:
> > > ACPI uses acpi_get_register() in order to get into suspend.
> > > This function is guarded by acpi_gbl_hardware_lock, which will be carried
> > > into resume phase.
> > > At resume interrupts are enabled and first ACPI interrupt deadlocks on
> > > this lock.
> >
> > Ouch. That might have bitten quite some people, I guess.
> >
> > > Solution seems to be to not lock register read, as there are no
> > > concurrent activity at this point.
> > >
> > > Reference: http://bugzilla.kernel.org/show_bug.cgi?id=7499
> > >
> > > Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
> >
> > Do you think it's -stable material?
>
> As someone who *has* been bitten by this bug - by all means.
>
> I'd like to emphasize one more point - we were able to debug it only because
> old kernel at least displayed debug messages. Current kernel deadlocks
> absolutely dead (pun intended). No output to console, no indication what
> happens. I consider this regression. If at all possible, we should make sure
> that console output is available as early as possible.
Compile with DISABLE_CONSOLE_SUSPEND set and it should work.
There's a patch queued up for 2.6.24 that adds a command line switch for that.
Greetings,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-02 15:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070930183936.32654.44391.stgit@samsung>
[not found] ` <20070930183942.32654.16220.stgit@samsung>
2007-10-01 20:38 ` [PATCH 2/2] ACPICA: hw: Don't carry spinlock over suspend Rafael J. Wysocki
2007-10-01 20:27 ` Alexey Starikovskiy
2007-10-02 4:07 Andrey Borzenkov
2007-10-02 15:59 ` Rafael J. Wysocki
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.