aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/utilities/utdelete.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 19:48:18 +0300
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:20 -0500
commitc81da66608d65dab04730582dfdfcdcab779e2fe (patch)
treee1d2936a457d3ac2b359b4fc676bedfd341fee86 /drivers/acpi/utilities/utdelete.c
parent8f9337c88335846b01801b1047a4caf10527a320 (diff)
ACPICA: Delete recursive feature of ACPI Global Lock
Completed a new design and implementation for the ACPI Global Lock support. On the OS side, the global lock is now treated as a standard AML mutex. Previously, multiple OS threads could acquire the global lock simultaneously, but this could cause the BIOS to be starved by the lock in cases such as the Embedded Controller driver, where there is a tight coupling between the OS and the BIOS. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r--drivers/acpi/utilities/utdelete.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index 9d3f1149ba2..af8e65f17fb 100644
--- a/drivers/acpi/utilities/utdelete.c
+++ b/drivers/acpi/utilities/utdelete.c
@@ -158,16 +158,20 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
"***** Mutex %p, OS Mutex %p\n",
object, object->mutex.os_mutex));
- if (object->mutex.os_mutex != ACPI_GLOBAL_LOCK) {
- acpi_ex_unlink_mutex(object);
- acpi_os_delete_mutex(object->mutex.os_mutex);
- } else {
- /* Global Lock "mutex" is actually a counting semaphore */
+ if (object->mutex.os_mutex == acpi_gbl_global_lock_mutex) {
+
+ /* Global Lock has extra semaphore */
(void)
acpi_os_delete_semaphore
(acpi_gbl_global_lock_semaphore);
acpi_gbl_global_lock_semaphore = NULL;
+
+ acpi_os_delete_mutex(object->mutex.os_mutex);
+ acpi_gbl_global_lock_mutex = NULL;
+ } else {
+ acpi_ex_unlink_mutex(object);
+ acpi_os_delete_mutex(object->mutex.os_mutex);
}
break;