summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/Osd
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2008-01-12 22:13:12 +0000
committernjl <njl@FreeBSD.org>2008-01-12 22:13:12 +0000
commit74b2511ef1200c90d852be6ec896e0196ae28f8c (patch)
treee188b6bef0619537f8842d9f92dc715e6465befb /sys/dev/acpica/Osd
parent1aa2c858ff65708697eea2fc202f954b996a1f7b (diff)
downloadFreeBSD-src-74b2511ef1200c90d852be6ec896e0196ae28f8c.zip
FreeBSD-src-74b2511ef1200c90d852be6ec896e0196ae28f8c.tar.gz
Fix GPE livelock that occurs on HP/Compaq laptops, mostly in the thermal
zone code. The GPE handler method (i.e. _L00) generates various Notify events that need to be run to completion before the GPE is re-enabled. In ACPI-CA, we queue an asynch callback at the same priority as a Notify so that it will only run after all Notify handlers have completed. The callback re-enables the GPE afterwards. We also changed the priority of Notifies to be the same as GPEs, given the possibility that another GPE could arrive before the Notifies have completed and we don't want it to get queued ahead of the rest. The ACPI-CA change was submitted by Alexey Starikovskiy (SUSE) and will appear in a later release. Special thanks to him for helping track this bug down. MFC after: 1 week Tested by: jhb, Yousif Hassan <yousif / alumni.jmu.edu>
Diffstat (limited to 'sys/dev/acpica/Osd')
-rw-r--r--sys/dev/acpica/Osd/OsdSchedule.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c
index 6872ffa..48e4dfe 100644
--- a/sys/dev/acpica/Osd/OsdSchedule.c
+++ b/sys/dev/acpica/Osd/OsdSchedule.c
@@ -106,6 +106,13 @@ AcpiOsExecute(ACPI_EXECUTE_TYPE Type, ACPI_OSD_EXEC_CALLBACK Function,
at->at_context = Context;
switch (Type) {
case OSL_GPE_HANDLER:
+ case OSL_NOTIFY_HANDLER:
+ /*
+ * Run GPEs and Notifies at the same priority. This allows
+ * Notifies that are generated by running a GPE's method (e.g., _L00)
+ * to not be pre-empted by a later GPE that arrives during the
+ * Notify handler execution.
+ */
pri = 10;
break;
case OSL_GLOBAL_LOCK_HANDLER:
@@ -113,9 +120,6 @@ AcpiOsExecute(ACPI_EXECUTE_TYPE Type, ACPI_OSD_EXEC_CALLBACK Function,
case OSL_EC_BURST_HANDLER:
pri = 5;
break;
- case OSL_NOTIFY_HANDLER:
- pri = 3;
- break;
case OSL_DEBUGGER_THREAD:
pri = 0;
break;
OpenPOWER on IntegriCloud