Skip to contentSkip to conversation

ACPI: Clear GPE before disabling it

PATCH New Jordan Crouse 1 participant 1 message Aug 8, 2006 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Clear GPE before disabling it

On AMD Geode BIOSen, we have problems with GPE interrupt storms. The attached patch resolves that. This should be fine for all implementations, though.

Jordan

Signature · 4 lines
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>

[PATCH] ACPI: Clear GPE before disabling it

From: William Morrow <[email protected]>

On some BIOSen, the GPE bit will remain set even if it is disabled, resulting in a interrupt storm. This patch clears the bit before disabling it.

---

 drivers/acpi/events/evgpe.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
drivers/acpi/events/evgpe.c +13 -1
index c76c058..1f93b23 100644
@@ -677,10 +677,22 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve
 	case ACPI_GPE_DISPATCH_METHOD:
 
 		/*
-		 * Disable GPE, so it doesn't keep firing before the method has a
+		 * Clear GPE, so it doesn't keep firing before the method has a
 		 * chance to run.
 		 */
+		status = acpi_hw_clear_gpe(gpe_event_info);
+		if (ACPI_FAILURE(status)) {
+			ACPI_EXCEPTION((AE_INFO, status,
+					"Unable to clear GPE[%2X]",
+					gpe_number));
+			return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
+		}
+		/*
+		 * Disable GPE, so it doesn't keep happen again.
+		 */
+
 		status = acpi_ev_disable_gpe(gpe_event_info);
+
 		if (ACPI_FAILURE(status)) {
 			ACPI_EXCEPTION((AE_INFO, status,
 					"Unable to disable GPE[%2X]",