aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/acobject.h
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2011-01-11 20:19:43 -0500
committerLen Brown <len.brown@intel.com>2011-01-18 23:48:03 -0500
commit262948428878fb340127faca1791acb17146122e (patch)
tree646ebdc7158fcdf889e59185dd58fd764725bc45 /drivers/acpi/acpica/acobject.h
parent672af843abfc9a41c7ec792722e04b6c68a3cfea (diff)
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>
Diffstat (limited to 'drivers/acpi/acpica/acobject.h')
-rw-r--r--drivers/acpi/acpica/acobject.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index bdbfaf22bd14..efaf9c6090f5 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -97,8 +97,6 @@
97#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized, _REG was run */ 97#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized, _REG was run */
98#define AOPOBJ_SETUP_COMPLETE 0x10 /* Region setup is complete */ 98#define AOPOBJ_SETUP_COMPLETE 0x10 /* Region setup is complete */
99#define AOPOBJ_INVALID 0x20 /* Host OS won't allow a Region address */ 99#define AOPOBJ_INVALID 0x20 /* Host OS won't allow a Region address */
100#define AOPOBJ_MODULE_LEVEL 0x40 /* Method is actually module-level code */
101#define AOPOBJ_MODIFIED_NAMESPACE 0x80 /* Method modified the namespace */
102 100
103/****************************************************************************** 101/******************************************************************************
104 * 102 *
@@ -175,7 +173,7 @@ struct acpi_object_region {
175}; 173};
176 174
177struct acpi_object_method { 175struct acpi_object_method {
178 ACPI_OBJECT_COMMON_HEADER u8 method_flags; 176 ACPI_OBJECT_COMMON_HEADER u8 info_flags;
179 u8 param_count; 177 u8 param_count;
180 u8 sync_level; 178 u8 sync_level;
181 union acpi_operand_object *mutex; 179 union acpi_operand_object *mutex;
@@ -183,13 +181,21 @@ struct acpi_object_method {
183 union { 181 union {
184 ACPI_INTERNAL_METHOD implementation; 182 ACPI_INTERNAL_METHOD implementation;
185 union acpi_operand_object *handler; 183 union acpi_operand_object *handler;
186 } extra; 184 } dispatch;
187 185
188 u32 aml_length; 186 u32 aml_length;
189 u8 thread_count; 187 u8 thread_count;
190 acpi_owner_id owner_id; 188 acpi_owner_id owner_id;
191}; 189};
192 190
191/* Flags for info_flags field above */
192
193#define ACPI_METHOD_MODULE_LEVEL 0x01 /* Method is actually module-level code */
194#define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */
195#define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */
196#define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */
197#define ACPI_METHOD_MODIFIED_NAMESPACE 0x10 /* Method modified the namespace */
198
193/****************************************************************************** 199/******************************************************************************
194 * 200 *
195 * Objects that can be notified. All share a common notify_info area. 201 * Objects that can be notified. All share a common notify_info area.