diff options
author | Bob Moore <robert.moore@intel.com> | 2007-02-02 19:48:18 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:20 -0500 |
commit | c81da66608d65dab04730582dfdfcdcab779e2fe (patch) | |
tree | e1d2936a457d3ac2b359b4fc676bedfd341fee86 /drivers/acpi/namespace | |
parent | 8f9337c88335846b01801b1047a4caf10527a320 (diff) | |
download | blackbird-op-linux-c81da66608d65dab04730582dfdfcdcab779e2fe.tar.gz blackbird-op-linux-c81da66608d65dab04730582dfdfcdcab779e2fe.zip |
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/namespace')
-rw-r--r-- | drivers/acpi/namespace/nsaccess.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index c1c6c236df9a..b2ef6730be81 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c @@ -195,31 +195,27 @@ acpi_status acpi_ns_root_initialize(void) obj_desc->mutex.sync_level = (u8) (ACPI_TO_INTEGER(val) - 1); - if (ACPI_STRCMP(init_val->name, "_GL_") == 0) { - - /* Create a counting semaphore for the global lock */ + /* 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; + } - 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; - } + /* Special case for ACPI Global Lock */ - /* Mark this mutex as very special */ + if (ACPI_STRCMP(init_val->name, "_GL_") == 0) { + acpi_gbl_global_lock_mutex = + obj_desc->mutex.os_mutex; - obj_desc->mutex.os_mutex = - ACPI_GLOBAL_LOCK; - } else { - /* Create a mutex */ + /* Create additional counting semaphore for global lock */ 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); |