aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utmutex.c
diff options
context:
space:
mode:
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",