aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dsmethod.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-07-07 20:44:38 -0400
committerLen Brown <len.brown@intel.com>2006-07-09 15:15:40 -0400
commitf6dd9221dddb3550e60d32aee688588ec208312c (patch)
treedbde18df728775aaf5be5c4526fbfd4c3f398cd5 /drivers/acpi/dispatcher/dsmethod.c
parent120bda20c6f64b32e8bfbdd7b34feafaa5f5332e (diff)
ACPI: ACPICA 20060707
Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to support C compilers that do not allow the initialization of address pointers within packed structures - even though the hardware itself may support misaligned transfers. Some of the debug data structures are packed by default to minimize size. Added an error message for the case where acpi_os_get_thread_id() returns zero. A non-zero value is required by the core ACPICA code to ensure the proper operation of AML mutexes and recursive control methods. The DSDT is now the only ACPI table that determines whether the AML interpreter is in 32-bit or 64-bit mode. Not really a functional change, but the hooks for per-table 32/64 switching have been removed from the code. A clarification to the ACPI specification is forthcoming in ACPI 3.0B. Fixed a possible leak of an Owner ID in the error path of tbinstal.c acpi_tb_init_table_descriptor() and migrated all table OwnerID deletion to a single place in acpi_tb_uninstall_table() to correct possible leaks when using the acpi_tb_delete_tables_by_type() interface (with assistance from Lance Ortiz.) Fixed a problem with Serialized control methods where the semaphore associated with the method could be over-signaled after multiple method invocations. Fixed two issues with the locking of the internal namespace data structure. Both the Unload() operator and acpi_unload_table() interface now lock the namespace during the namespace deletion associated with the table unload (with assistance from Linn Crosetto.) Fixed problem reports (Valery Podrezov) integrated: - Eliminate unnecessary memory allocation for CreateXxxxField http://bugzilla.kernel.org/show_bug.cgi?id=5426 Fixed problem reports (Fiodor Suietov) integrated: - Incomplete cleanup branches in AcpiTbGetTableRsdt (BZ 369) - On Address Space handler deletion, needless deactivation call (BZ 374) - AcpiRemoveAddressSpaceHandler: validate Device handle parameter (BZ 375) - Possible memory leak, Notify sub-objects of Processor, Power, ThermalZone (BZ 376) - AcpiRemoveAddressSpaceHandler: validate Handler parameter (BZ 378) - Minimum Length of RSDT should be validated (BZ 379) - AcpiRemoveNotifyHandler: return AE_NOT_EXIST if Processor Obj has no Handler (BZ (380) - AcpiUnloadTable: return AE_NOT_EXIST if no table of specified type loaded (BZ 381) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dispatcher/dsmethod.c')
-rw-r--r--drivers/acpi/dispatcher/dsmethod.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c
index a39a33f4847..cf888add319 100644
--- a/drivers/acpi/dispatcher/dsmethod.c
+++ b/drivers/acpi/dispatcher/dsmethod.c
@@ -134,7 +134,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)
134 union acpi_operand_object *mutex_desc; 134 union acpi_operand_object *mutex_desc;
135 acpi_status status; 135 acpi_status status;
136 136
137 ACPI_FUNCTION_NAME(ds_create_method_mutex); 137 ACPI_FUNCTION_TRACE(ds_create_method_mutex);
138 138
139 /* Create the new mutex object */ 139 /* Create the new mutex object */
140 140
@@ -493,7 +493,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
493 493
494 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 494 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
495 "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n", 495 "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
496 (char *)&walk_state->method_node->name, 496 acpi_ut_get_node_name(walk_state->method_node),
497 walk_state->method_call_op, return_desc)); 497 walk_state->method_call_op, return_desc));
498 498
499 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 499 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
@@ -610,6 +610,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
610 610
611 acpi_os_release_mutex(method_desc->method.mutex->mutex. 611 acpi_os_release_mutex(method_desc->method.mutex->mutex.
612 os_mutex); 612 os_mutex);
613 method_desc->method.mutex->mutex.owner_thread = NULL;
613 } 614 }
614 } 615 }
615 616
@@ -620,27 +621,11 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
620 */ 621 */
621 method_node = walk_state->method_node; 622 method_node = walk_state->method_node;
622 623
623 /* Lock namespace for possible update */
624
625 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
626 if (ACPI_FAILURE(status)) {
627 return_VOID;
628 }
629
630 /*
631 * Delete any namespace entries created immediately underneath
632 * the method
633 */
634 if (method_node && method_node->child) {
635 acpi_ns_delete_namespace_subtree(method_node);
636 }
637
638 /* 624 /*
639 * Delete any namespace entries created anywhere else within 625 * Delete any namespace objects created anywhere within
640 * the namespace by the execution of this method 626 * the namespace by the execution of this method
641 */ 627 */
642 acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id); 628 acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id);
643 status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
644 } 629 }
645 630
646 /* Decrement the thread count on the method */ 631 /* Decrement the thread count on the method */