Skip to contentSkip to conversation

ACPI: Clear GPE before disabling it

PATCH Applied [email protected] 3 participants 4 messages Dec 19, 2006 – Dec 25, 2006 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/19 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 deletion(-)
drivers/acpi/events/evgpe.c renamed from drivers/acpi/events/evgpe.c~acpi-clear-gpe-before-disabling-it +13 -1
diff -puN drivers/acpi/events/evgpe.c~acpi-clear-gpe-before-disabling-it drivers/acpi/events/evgpe.c
@@ -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]",

_

reviewer NAK
#1 lore raw

NAK

Per previous discussions, I continue to have no plans to apply this patch as it stands, and am awaiting reply from the author if the latest ACPICA code
works properly on their machine without this patch.

thanks,
-Len

Quoted 46 lines · On Tuesday 19 December 2006 15:56, [email protected] wrote:

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 deletion(-)

diff -puN drivers/acpi/events/evgpe.c~acpi-clear-gpe-before-disabling-it drivers/acpi/events/evgpe.c

drivers/acpi/events/evgpe.c renamed from drivers/acpi/events/evgpe.c~acpi-clear-gpe-before-disabling-it +13 -1
@@ -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]",

_

#2 lore raw
Quoted 6 lines · On Fri, 22 Dec 2006 21:15:50 -0500 Len Brown <[email protected]> wrote:

NAK

Per previous discussions, I continue to have no plans to apply this patch as it stands, and am awaiting reply from the author if the latest ACPICA code
works properly on their machine without this patch.

Well I'm fed up with maintaining the thing in the presence of continuous underlying churn and apparent non-communication from involved parties, so I'll drop it.

Quoted 48 lines · On Tuesday 19 December 2006 15:56, [email protected] wrote:
Quoted 46 lines

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 deletion(-)

diff -puN drivers/acpi/events/evgpe.c~acpi-clear-gpe-before-disabling-it drivers/acpi/events/evgpe.c

drivers/acpi/events/evgpe.c renamed from drivers/acpi/events/evgpe.c~acpi-clear-gpe-before-disabling-it +13 -1
@@ -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]",

_

#3 lore raw
In reply to Len Brown
Quoted 5 lines · Len Brown

NAK

Per previous discussions, I continue to have no plans to apply this patch as it stands, and am awaiting reply from the author if the latest ACPICA code
works properly on their machine without this patch.

He is on vacation, I believe - probably won't hear from him until the beginning of the year. I could try to re-create it, but I don't really know what he did - so its probably faster to just wait.

Jordan