From d30dc9abb4aacfd4df3f486f22bcbc0531b73283 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Sun, 30 Sep 2007 22:39:36 +0400 Subject: ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write} use_lock flag is used once for acpi_hw_register_read, and never for acpi_hw_register_write. It will greatly simplify understanding of locking if we just drop this use_lock altogether, and wrap the only call to ..._read in lock/unlock. Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- include/acpi/achware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/acpi/achware.h b/include/acpi/achware.h index 9df275cf7bc1..4053df943453 100644 --- a/include/acpi/achware.h +++ b/include/acpi/achware.h @@ -71,9 +71,9 @@ u32 acpi_hw_get_mode(void); struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id); acpi_status -acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value); +acpi_hw_register_read(u32 register_id, u32 * return_value); -acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value); +acpi_status acpi_hw_register_write(u32 register_id, u32 value); acpi_status acpi_hw_low_level_read(u32 width, -- cgit v1.2.3 From 2d571b33cf7efd6a894e765e3cb45587ec5b834a Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Sun, 30 Sep 2007 22:39:42 +0400 Subject: ACPICA: hw: Don't carry spinlock over suspend 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 Signed-off-by: Len Brown --- include/acpi/acpixf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 3d7ab9e0c9fe..9512f0456ad1 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 -- cgit v1.2.3