ACPICA: hw: Don't carry spinlock over suspend
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Sun, 30 Sep 2007 18:39:42 +0000 (22:39 +0400)
committerLen Brown <len.brown@intel.com>
Wed, 10 Oct 2007 05:00:39 +0000 (01:00 -0400)
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>
drivers/acpi/hardware/hwsleep.c
include/acpi/acpixf.h

index 4d0c677fac19fdb6ac4c9cc041c776a5f472b52f..c0577ca55358d942fb3c4bc20d80133f89071fdf 100644 (file)
@@ -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);
                }
index 3d7ab9e0c9fe2e93dacda51f409b65cbe5a0bb3f..9512f0456ad1f241df8ba36e64f1d0cb060fef6a 100644 (file)
@@ -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
This page took 0.041679 seconds and 5 git commands to generate.