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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user