aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utmutex.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-27 16:43:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-31 03:25:09 -0500
commitb8e4d89357fc434618a59c1047cac72641191805 (patch)
treeac97fcc6fdc277c682365900663872c96f2420bd /drivers/acpi/utilities/utmutex.c
parent292dd876ee765c478b27c93cc51e93a558ed58bf (diff)
[ACPI] ACPICA 20060127
Implemented support in the Resource Manager to allow unresolved namestring references within resource package objects for the _PRT method. This support is in addition to the previously implemented unresolved reference support within the AML parser. If the interpreter slack mode is enabled (true on Linux unless acpi=strict), these unresolved references will be passed through to the caller as a NULL package entry. http://bugzilla.kernel.org/show_bug.cgi?id=5741 Implemented and deployed new macros and functions for error and warning messages across the subsystem. These macros are simpler and generate less code than their predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION, ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_* macros. Implemented the acpi_cpu_flags type to simplify host OS integration of the Acquire/Release Lock OSL interfaces. Suggested by Steven Rostedt and Andrew Morton. Fixed a problem where Alias ASL operators are sometimes not correctly resolved. causing AE_AML_INTERNAL http://bugzilla.kernel.org/show_bug.cgi?id=5189 http://bugzilla.kernel.org/show_bug.cgi?id=5674 Fixed several problems with the implementation of the ConcatenateResTemplate ASL operator. As per the ACPI specification, zero length buffers are now treated as a single EndTag. One-length buffers always cause a fatal exception. Non-zero length buffers that do not end with a full 2-byte EndTag cause a fatal exception. Fixed a possible structure overwrite in the AcpiGetObjectInfo external interface. (With assistance from Thomas Renninger) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities/utmutex.c')
-rw-r--r--drivers/acpi/utilities/utmutex.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c
index ffaff55270b1..45a7244df924 100644
--- a/drivers/acpi/utilities/utmutex.c
+++ b/drivers/acpi/utilities/utmutex.c
@@ -216,12 +216,20 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
216 for (i = mutex_id; i < MAX_MUTEX; i++) { 216 for (i = mutex_id; i < MAX_MUTEX; i++) {
217 if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { 217 if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {
218 if (i == mutex_id) { 218 if (i == mutex_id) {
219 ACPI_REPORT_ERROR(("Mutex [%s] already acquired by this thread [%X]\n", acpi_ut_get_mutex_name(mutex_id), this_thread_id)); 219 ACPI_ERROR((AE_INFO,
220 "Mutex [%s] already acquired by this thread [%X]",
221 acpi_ut_get_mutex_name
222 (mutex_id),
223 this_thread_id));
220 224
221 return (AE_ALREADY_ACQUIRED); 225 return (AE_ALREADY_ACQUIRED);
222 } 226 }
223 227
224 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))); 228 ACPI_ERROR((AE_INFO,
229 "Invalid acquire order: Thread %X owns [%s], wants [%s]",
230 this_thread_id,
231 acpi_ut_get_mutex_name(i),
232 acpi_ut_get_mutex_name(mutex_id)));
225 233
226 return (AE_ACQUIRE_DEADLOCK); 234 return (AE_ACQUIRE_DEADLOCK);
227 } 235 }
@@ -244,7 +252,9 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
244 acpi_gbl_mutex_info[mutex_id].use_count++; 252 acpi_gbl_mutex_info[mutex_id].use_count++;
245 acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; 253 acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id;
246 } else { 254 } else {
247 ACPI_REPORT_ERROR(("Thread %X could not acquire Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status))); 255 ACPI_EXCEPTION((AE_INFO, status,
256 "Thread %X could not acquire Mutex [%X]",
257 this_thread_id, mutex_id));
248 } 258 }
249 259
250 return (status); 260 return (status);
@@ -282,7 +292,9 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
282 * Mutex must be acquired in order to release it! 292 * Mutex must be acquired in order to release it!
283 */ 293 */
284 if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { 294 if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) {
285 ACPI_REPORT_ERROR(("Mutex [%X] is not acquired, cannot release\n", mutex_id)); 295 ACPI_ERROR((AE_INFO,
296 "Mutex [%X] is not acquired, cannot release",
297 mutex_id));
286 298
287 return (AE_NOT_ACQUIRED); 299 return (AE_NOT_ACQUIRED);
288 } 300 }
@@ -303,7 +315,10 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
303 continue; 315 continue;
304 } 316 }
305 317
306 ACPI_REPORT_ERROR(("Invalid release order: owns [%s], releasing [%s]\n", acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id))); 318 ACPI_ERROR((AE_INFO,
319 "Invalid release order: owns [%s], releasing [%s]",
320 acpi_ut_get_mutex_name(i),
321 acpi_ut_get_mutex_name(mutex_id)));
307 322
308 return (AE_RELEASE_DEADLOCK); 323 return (AE_RELEASE_DEADLOCK);
309 } 324 }
@@ -319,7 +334,9 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
319 acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); 334 acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1);
320 335
321 if (ACPI_FAILURE(status)) { 336 if (ACPI_FAILURE(status)) {
322 ACPI_REPORT_ERROR(("Thread %X could not release Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status))); 337 ACPI_EXCEPTION((AE_INFO, status,
338 "Thread %X could not release Mutex [%X]",
339 this_thread_id, mutex_id));
323 } else { 340 } else {
324 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, 341 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
325 "Thread %X released Mutex [%s]\n", 342 "Thread %X released Mutex [%s]\n",