Skip to content

Commit

Permalink
ACPICA: hw: Don't carry spinlock over suspend
Browse files Browse the repository at this point in the history
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.
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>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alexey Starikovskiy authored and Len Brown committed Oct 10, 2007
1 parent d30dc9a commit 2d571b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/hardware/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d571b3

Please sign in to comment.