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>
This commit is contained in:
njl 2008-01-12 22:13:12 +00:00
parent 1aa2c858ff
commit 74b2511ef1

View File

@ -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;