[ACPI] ACPICA 20060113
Added 2006 copyright. At SuSE's suggestion, enabled all error messages without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively. This preserves all error and warning messages in the non-debug version of the ACPICA code (this has been referred to as the "debug lite" option.) Over 200 cases were converted to create a total of over 380 error/warning messages across the ACPICA code. This increases the code and data size of the default non-debug version by about 13K. Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages. The size of the debug version remains about the same. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2005, R. Byron Moore
|
||||
* Copyright (C) 2000 - 2006, R. Byron Moore
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -216,21 +216,12 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
|
||||
for (i = mutex_id; i < MAX_MUTEX; i++) {
|
||||
if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
|
||||
if (i == mutex_id) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Mutex [%s] already acquired by this thread [%X]\n",
|
||||
acpi_ut_get_mutex_name
|
||||
(mutex_id),
|
||||
this_thread_id));
|
||||
ACPI_REPORT_ERROR(("Mutex [%s] already acquired by this thread [%X]\n", acpi_ut_get_mutex_name(mutex_id), this_thread_id));
|
||||
|
||||
return (AE_ALREADY_ACQUIRED);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Invalid acquire order: Thread %X owns [%s], wants [%s]\n",
|
||||
this_thread_id,
|
||||
acpi_ut_get_mutex_name(i),
|
||||
acpi_ut_get_mutex_name
|
||||
(mutex_id)));
|
||||
ACPI_REPORT_ERROR(("Invalid acquire order: Thread %X owns [%s], wants [%s]\n", this_thread_id, acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id)));
|
||||
|
||||
return (AE_ACQUIRE_DEADLOCK);
|
||||
}
|
||||
@@ -253,11 +244,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
|
||||
acpi_gbl_mutex_info[mutex_id].use_count++;
|
||||
acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id;
|
||||
} else {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Thread %X could not acquire Mutex [%s] %s\n",
|
||||
this_thread_id,
|
||||
acpi_ut_get_mutex_name(mutex_id),
|
||||
acpi_format_exception(status)));
|
||||
ACPI_REPORT_ERROR(("Thread %X could not acquire Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status)));
|
||||
}
|
||||
|
||||
return (status);
|
||||
@@ -295,9 +282,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
|
||||
* Mutex must be acquired in order to release it!
|
||||
*/
|
||||
if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Mutex [%s] is not acquired, cannot release\n",
|
||||
acpi_ut_get_mutex_name(mutex_id)));
|
||||
ACPI_REPORT_ERROR(("Mutex [%X] is not acquired, cannot release\n", mutex_id));
|
||||
|
||||
return (AE_NOT_ACQUIRED);
|
||||
}
|
||||
@@ -318,11 +303,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
|
||||
continue;
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Invalid release order: owns [%s], releasing [%s]\n",
|
||||
acpi_ut_get_mutex_name(i),
|
||||
acpi_ut_get_mutex_name
|
||||
(mutex_id)));
|
||||
ACPI_REPORT_ERROR(("Invalid release order: owns [%s], releasing [%s]\n", acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id)));
|
||||
|
||||
return (AE_RELEASE_DEADLOCK);
|
||||
}
|
||||
@@ -338,11 +319,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
|
||||
acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1);
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Thread %X could not release Mutex [%s] %s\n",
|
||||
this_thread_id,
|
||||
acpi_ut_get_mutex_name(mutex_id),
|
||||
acpi_format_exception(status)));
|
||||
ACPI_REPORT_ERROR(("Thread %X could not release Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status)));
|
||||
} else {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
|
||||
"Thread %X released Mutex [%s]\n",
|
||||
|
Reference in New Issue
Block a user