All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-acpi@vger.kernel.org
Cc: Alexey Starikovskiy <astarikovskiy@suse.de>,
	Len Brown <len.brown@intel.com>
Subject: [PATCH 4/4] ACPICA: hw: Don't carry spinlock over suspend
Date: Wed, 10 Oct 2007 01:07:50 -0400	[thread overview]
Message-ID: <1191992870-15009-5-git-send-email-lenb@kernel.org> (raw)
Message-ID: <2d571b33cf7efd6a894e765e3cb45587ec5b834a.1191992618.git.len.brown@intel.com> (raw)
In-Reply-To: <1191992870-15009-4-git-send-email-lenb@kernel.org>
In-Reply-To: <4f86d3a8e297205780cca027e974fd5f81064780.1191992618.git.len.brown@intel.com>

From: Alexey Starikovskiy <astarikovskiy@suse.de>

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 |    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
-- 
1.5.3.4.206.g58ba4

  parent reply	other threads:[~2007-10-10  5:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10  5:07 ACPI patches on test branch, which are not on release branch Len Brown
2007-10-10  5:07 ` [PATCH 1/4] cpuidle: consolidate 2.6.22 cpuidle branch into one patch Len Brown
2007-10-10  5:07   ` Len Brown
2007-10-10  5:07   ` [PATCH 2/4] ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle Len Brown
2007-10-10  5:07     ` Len Brown
2007-10-10  5:07   ` [PATCH 3/4] ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write} Len Brown
2007-10-10  5:07     ` Len Brown
2007-10-10  5:07   ` Len Brown [this message]
2007-10-10  5:07     ` [PATCH 4/4] ACPICA: hw: Don't carry spinlock over suspend Len Brown

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=1191992870-15009-5-git-send-email-lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=astarikovskiy@suse.de \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    /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 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.