diff options
Diffstat (limited to 'drivers/acpi/utilities/utmutex.c')
-rw-r--r-- | drivers/acpi/utilities/utmutex.c | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c index e158b1b6313b..ffaff55270b1 100644 --- a/drivers/acpi/utilities/utmutex.c +++ b/drivers/acpi/utilities/utmutex.c | |||
@@ -5,7 +5,7 @@ | |||
5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * 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) | |||
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_DEBUG_PRINT((ACPI_DB_ERROR, | 219 | ACPI_REPORT_ERROR(("Mutex [%s] already acquired by this thread [%X]\n", acpi_ut_get_mutex_name(mutex_id), this_thread_id)); |
220 | "Mutex [%s] already acquired by this thread [%X]\n", | ||
221 | acpi_ut_get_mutex_name | ||
222 | (mutex_id), | ||
223 | this_thread_id)); | ||
224 | 220 | ||
225 | return (AE_ALREADY_ACQUIRED); | 221 | return (AE_ALREADY_ACQUIRED); |
226 | } | 222 | } |
227 | 223 | ||
228 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 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))); |
229 | "Invalid acquire order: Thread %X owns [%s], wants [%s]\n", | ||
230 | this_thread_id, | ||
231 | acpi_ut_get_mutex_name(i), | ||
232 | acpi_ut_get_mutex_name | ||
233 | (mutex_id))); | ||
234 | 225 | ||
235 | return (AE_ACQUIRE_DEADLOCK); | 226 | return (AE_ACQUIRE_DEADLOCK); |
236 | } | 227 | } |
@@ -253,11 +244,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | |||
253 | acpi_gbl_mutex_info[mutex_id].use_count++; | 244 | acpi_gbl_mutex_info[mutex_id].use_count++; |
254 | acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; | 245 | acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; |
255 | } else { | 246 | } else { |
256 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 247 | ACPI_REPORT_ERROR(("Thread %X could not acquire Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status))); |
257 | "Thread %X could not acquire Mutex [%s] %s\n", | ||
258 | this_thread_id, | ||
259 | acpi_ut_get_mutex_name(mutex_id), | ||
260 | acpi_format_exception(status))); | ||
261 | } | 248 | } |
262 | 249 | ||
263 | return (status); | 250 | return (status); |
@@ -295,9 +282,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | |||
295 | * Mutex must be acquired in order to release it! | 282 | * Mutex must be acquired in order to release it! |
296 | */ | 283 | */ |
297 | if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { | 284 | if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { |
298 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 285 | ACPI_REPORT_ERROR(("Mutex [%X] is not acquired, cannot release\n", mutex_id)); |
299 | "Mutex [%s] is not acquired, cannot release\n", | ||
300 | acpi_ut_get_mutex_name(mutex_id))); | ||
301 | 286 | ||
302 | return (AE_NOT_ACQUIRED); | 287 | return (AE_NOT_ACQUIRED); |
303 | } | 288 | } |
@@ -318,11 +303,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | |||
318 | continue; | 303 | continue; |
319 | } | 304 | } |
320 | 305 | ||
321 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 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))); |
322 | "Invalid release order: owns [%s], releasing [%s]\n", | ||
323 | acpi_ut_get_mutex_name(i), | ||
324 | acpi_ut_get_mutex_name | ||
325 | (mutex_id))); | ||
326 | 307 | ||
327 | return (AE_RELEASE_DEADLOCK); | 308 | return (AE_RELEASE_DEADLOCK); |
328 | } | 309 | } |
@@ -338,11 +319,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | |||
338 | acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); | 319 | acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); |
339 | 320 | ||
340 | if (ACPI_FAILURE(status)) { | 321 | if (ACPI_FAILURE(status)) { |
341 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 322 | ACPI_REPORT_ERROR(("Thread %X could not release Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status))); |
342 | "Thread %X could not release Mutex [%s] %s\n", | ||
343 | this_thread_id, | ||
344 | acpi_ut_get_mutex_name(mutex_id), | ||
345 | acpi_format_exception(status))); | ||
346 | } else { | 323 | } else { |
347 | ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, | 324 | ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, |
348 | "Thread %X released Mutex [%s]\n", | 325 | "Thread %X released Mutex [%s]\n", |