ACPI: ACPICA 20060608
Converted the locking mutex used for the ACPI hardware to a spinlock. This change should eliminate all problems caused by attempting to acquire a semaphore at interrupt level, and it means that all ACPICA external interfaces that directly access the ACPI hardware can be safely called from interrupt level. Fixed a regression introduced in 20060526 where the ACPI device initialization could be prematurely aborted with an AE_NOT_FOUND if a device did not have an optional _INI method. Fixed an IndexField issue where a write to the Data Register should be limited in size to the AccessSize (width) of the IndexField itself. (BZ 433, Fiodor Suietov) Fixed problem reports (Valery Podrezov) integrated: - Allow store of ThermalZone objects to Debug object. http://bugzilla.kernel.org/show_bug.cgi?id=5369 http://bugzilla.kernel.org/show_bug.cgi?id=5370 Fixed problem reports (Fiodor Suietov) integrated: - acpi_get_table_header() doesn't handle multiple instances correctly (BZ 364) Removed four global mutexes that were obsolete and were no longer being used. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -73,14 +73,21 @@ acpi_status acpi_ut_mutex_initialize(void)
|
||||
/*
|
||||
* Create each of the predefined mutex objects
|
||||
*/
|
||||
for (i = 0; i < NUM_MUTEX; i++) {
|
||||
for (i = 0; i < ACPI_NUM_MUTEX; i++) {
|
||||
status = acpi_ut_create_mutex(i);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
}
|
||||
|
||||
/* Create the spinlocks for use at interrupt level */
|
||||
|
||||
status = acpi_os_create_lock(&acpi_gbl_gpe_lock);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
status = acpi_os_create_lock(&acpi_gbl_hardware_lock);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
@@ -105,11 +112,14 @@ void acpi_ut_mutex_terminate(void)
|
||||
/*
|
||||
* Delete each predefined mutex object
|
||||
*/
|
||||
for (i = 0; i < NUM_MUTEX; i++) {
|
||||
for (i = 0; i < ACPI_NUM_MUTEX; i++) {
|
||||
(void)acpi_ut_delete_mutex(i);
|
||||
}
|
||||
|
||||
/* Delete the spinlocks */
|
||||
|
||||
acpi_os_delete_lock(acpi_gbl_gpe_lock);
|
||||
acpi_os_delete_lock(acpi_gbl_hardware_lock);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
@@ -131,7 +141,7 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id)
|
||||
|
||||
ACPI_FUNCTION_TRACE_U32(ut_create_mutex, mutex_id);
|
||||
|
||||
if (mutex_id > MAX_MUTEX) {
|
||||
if (mutex_id > ACPI_MAX_MUTEX) {
|
||||
return_ACPI_STATUS(AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -165,7 +175,7 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
|
||||
|
||||
ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id);
|
||||
|
||||
if (mutex_id > MAX_MUTEX) {
|
||||
if (mutex_id > ACPI_MAX_MUTEX) {
|
||||
return_ACPI_STATUS(AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -196,7 +206,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
|
||||
|
||||
ACPI_FUNCTION_NAME(ut_acquire_mutex);
|
||||
|
||||
if (mutex_id > MAX_MUTEX) {
|
||||
if (mutex_id > ACPI_MAX_MUTEX) {
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -213,7 +223,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
|
||||
* the mutex ordering rule. This indicates a coding error somewhere in
|
||||
* the ACPI subsystem code.
|
||||
*/
|
||||
for (i = mutex_id; i < MAX_MUTEX; i++) {
|
||||
for (i = mutex_id; i < ACPI_MAX_MUTEX; i++) {
|
||||
if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
|
||||
if (i == mutex_id) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
@@ -284,7 +294,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
|
||||
"Thread %X releasing Mutex [%s]\n", this_thread_id,
|
||||
acpi_ut_get_mutex_name(mutex_id)));
|
||||
|
||||
if (mutex_id > MAX_MUTEX) {
|
||||
if (mutex_id > ACPI_MAX_MUTEX) {
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -309,7 +319,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
|
||||
* ordering rule. This indicates a coding error somewhere in
|
||||
* the ACPI subsystem code.
|
||||
*/
|
||||
for (i = mutex_id; i < MAX_MUTEX; i++) {
|
||||
for (i = mutex_id; i < ACPI_MAX_MUTEX; i++) {
|
||||
if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
|
||||
if (i == mutex_id) {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user