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>
This commit is contained in:
Bob Moore
2007-02-02 19:48:18 +03:00
committed by Len Brown
parent 8f9337c883
commit c81da66608
9 changed files with 133 additions and 199 deletions

View File

@@ -195,31 +195,27 @@ acpi_status acpi_ns_root_initialize(void)
obj_desc->mutex.sync_level =
(u8) (ACPI_TO_INTEGER(val) - 1);
/* Create a mutex */
status =
acpi_os_create_mutex(&obj_desc->mutex.
os_mutex);
if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference(obj_desc);
goto unlock_and_exit;
}
/* Special case for ACPI Global Lock */
if (ACPI_STRCMP(init_val->name, "_GL_") == 0) {
acpi_gbl_global_lock_mutex =
obj_desc->mutex.os_mutex;
/* Create a counting semaphore for the global lock */
/* Create additional counting semaphore for global lock */
status =
acpi_os_create_semaphore
(ACPI_NO_UNIT_LIMIT, 1,
&acpi_gbl_global_lock_semaphore);
if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference
(obj_desc);
goto unlock_and_exit;
}
/* Mark this mutex as very special */
obj_desc->mutex.os_mutex =
ACPI_GLOBAL_LOCK;
} else {
/* Create a mutex */
status =
acpi_os_create_mutex(&obj_desc->
mutex.
os_mutex);
acpi_os_create_semaphore(1, 1,
&acpi_gbl_global_lock_semaphore);
if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference
(obj_desc);