ACPICA: Fix issues/fault with automatic "serialized" method support
authorLin Ming <ming.m.lin@intel.com>
Wed, 12 Jan 2011 01:19:43 +0000 (09:19 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 19 Jan 2011 04:48:03 +0000 (23:48 -0500)
commit262948428878fb340127faca1791acb17146122e
tree646ebdc7158fcdf889e59185dd58fd764725bc45
parent672af843abfc9a41c7ec792722e04b6c68a3cfea
ACPICA: Fix issues/fault with automatic "serialized" method support

History: This support changes a method to "serialized" on the fly if the
method generates an AE_ALREADY_EXISTS error, indicating the possibility
that it cannot handle reentrancy.

This fix repairs a couple of issues seen in the field, especially on
machines with many cores.

1) Delete method children only upon the exit of the last thread, so
as to not delete objects out from under running threads.

2) Set the "serialized" bit for the method only upon the exit of the
last thread, so as to not cause deadlock when running threads attempt
to exit.

3) Cleanup the use of the AML "MethodFlags" and internal method flags
so that there is no longer any confustion between the two.

Reported-by: Dana Myers <dana.myers@oracle.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 files changed:
drivers/acpi/acpica/acobject.h
drivers/acpi/acpica/amlcode.h
drivers/acpi/acpica/dsmethod.c
drivers/acpi/acpica/evrgnini.c
drivers/acpi/acpica/excreate.c
drivers/acpi/acpica/exdump.c
drivers/acpi/acpica/nsaccess.c
drivers/acpi/acpica/nsalloc.c
drivers/acpi/acpica/nseval.c
drivers/acpi/acpica/nsxfname.c
drivers/acpi/acpica/psloop.c
drivers/acpi/acpica/psparse.c
drivers/acpi/acpica/psxface.c