diff options
Diffstat (limited to 'drivers/acpi/acpica/utdebug.c')
-rw-r--r-- | drivers/acpi/acpica/utdebug.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index 1a67b3944b3b..03ae8affe48f 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c | |||
@@ -185,6 +185,7 @@ acpi_debug_print(u32 requested_debug_level, | |||
185 | } | 185 | } |
186 | 186 | ||
187 | acpi_gbl_prev_thread_id = thread_id; | 187 | acpi_gbl_prev_thread_id = thread_id; |
188 | acpi_gbl_nesting_level = 0; | ||
188 | } | 189 | } |
189 | 190 | ||
190 | /* | 191 | /* |
@@ -193,13 +194,21 @@ acpi_debug_print(u32 requested_debug_level, | |||
193 | */ | 194 | */ |
194 | acpi_os_printf("%9s-%04ld ", module_name, line_number); | 195 | acpi_os_printf("%9s-%04ld ", module_name, line_number); |
195 | 196 | ||
197 | #ifdef ACPI_EXEC_APP | ||
198 | /* | ||
199 | * For acpi_exec only, emit the thread ID and nesting level. | ||
200 | * Note: nesting level is really only useful during a single-thread | ||
201 | * execution. Otherwise, multiple threads will keep resetting the | ||
202 | * level. | ||
203 | */ | ||
196 | if (ACPI_LV_THREADS & acpi_dbg_level) { | 204 | if (ACPI_LV_THREADS & acpi_dbg_level) { |
197 | acpi_os_printf("[%u] ", (u32)thread_id); | 205 | acpi_os_printf("[%u] ", (u32)thread_id); |
198 | } | 206 | } |
199 | 207 | ||
200 | acpi_os_printf("[%02ld] %-22.22s: ", | 208 | acpi_os_printf("[%02ld] ", acpi_gbl_nesting_level); |
201 | acpi_gbl_nesting_level, | 209 | #endif |
202 | acpi_ut_trim_function_name(function_name)); | 210 | |
211 | acpi_os_printf("%-22.22s: ", acpi_ut_trim_function_name(function_name)); | ||
203 | 212 | ||
204 | va_start(args, format); | 213 | va_start(args, format); |
205 | acpi_os_vprintf(format, args); | 214 | acpi_os_vprintf(format, args); |
@@ -420,7 +429,9 @@ acpi_ut_exit(u32 line_number, | |||
420 | component_id, "%s\n", acpi_gbl_fn_exit_str); | 429 | component_id, "%s\n", acpi_gbl_fn_exit_str); |
421 | } | 430 | } |
422 | 431 | ||
423 | acpi_gbl_nesting_level--; | 432 | if (acpi_gbl_nesting_level) { |
433 | acpi_gbl_nesting_level--; | ||
434 | } | ||
424 | } | 435 | } |
425 | 436 | ||
426 | ACPI_EXPORT_SYMBOL(acpi_ut_exit) | 437 | ACPI_EXPORT_SYMBOL(acpi_ut_exit) |
@@ -467,7 +478,9 @@ acpi_ut_status_exit(u32 line_number, | |||
467 | } | 478 | } |
468 | } | 479 | } |
469 | 480 | ||
470 | acpi_gbl_nesting_level--; | 481 | if (acpi_gbl_nesting_level) { |
482 | acpi_gbl_nesting_level--; | ||
483 | } | ||
471 | } | 484 | } |
472 | 485 | ||
473 | ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) | 486 | ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) |
@@ -504,7 +517,9 @@ acpi_ut_value_exit(u32 line_number, | |||
504 | ACPI_FORMAT_UINT64(value)); | 517 | ACPI_FORMAT_UINT64(value)); |
505 | } | 518 | } |
506 | 519 | ||
507 | acpi_gbl_nesting_level--; | 520 | if (acpi_gbl_nesting_level) { |
521 | acpi_gbl_nesting_level--; | ||
522 | } | ||
508 | } | 523 | } |
509 | 524 | ||
510 | ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) | 525 | ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) |
@@ -540,7 +555,9 @@ acpi_ut_ptr_exit(u32 line_number, | |||
540 | ptr); | 555 | ptr); |
541 | } | 556 | } |
542 | 557 | ||
543 | acpi_gbl_nesting_level--; | 558 | if (acpi_gbl_nesting_level) { |
559 | acpi_gbl_nesting_level--; | ||
560 | } | ||
544 | } | 561 | } |
545 | 562 | ||
546 | #endif | 563 | #endif |