aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utdebug.c')
-rw-r--r--drivers/acpi/acpica/utdebug.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index e810894149ae..5d95166245ae 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -47,8 +47,9 @@
47 47
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utdebug") 49ACPI_MODULE_NAME("utdebug")
50
50#ifdef ACPI_DEBUG_OUTPUT 51#ifdef ACPI_DEBUG_OUTPUT
51static acpi_thread_id acpi_gbl_prev_thread_id; 52static acpi_thread_id acpi_gbl_prev_thread_id = (acpi_thread_id) 0xFFFFFFFF;
52static char *acpi_gbl_fn_entry_str = "----Entry"; 53static char *acpi_gbl_fn_entry_str = "----Entry";
53static char *acpi_gbl_fn_exit_str = "----Exit-"; 54static char *acpi_gbl_fn_exit_str = "----Exit-";
54 55
@@ -109,7 +110,7 @@ void acpi_ut_track_stack_ptr(void)
109 * RETURN: Updated pointer to the function name 110 * RETURN: Updated pointer to the function name
110 * 111 *
111 * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. 112 * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
112 * This allows compiler macros such as __func__ to be used 113 * This allows compiler macros such as __FUNCTION__ to be used
113 * with no change to the debug output. 114 * with no change to the debug output.
114 * 115 *
115 ******************************************************************************/ 116 ******************************************************************************/
@@ -222,7 +223,7 @@ ACPI_EXPORT_SYMBOL(acpi_debug_print)
222 * 223 *
223 * RETURN: None 224 * RETURN: None
224 * 225 *
225 * DESCRIPTION: Print message with no headers. Has same interface as 226 * DESCRIPTION: Print message with no headers. Has same interface as
226 * debug_print so that the same macros can be used. 227 * debug_print so that the same macros can be used.
227 * 228 *
228 ******************************************************************************/ 229 ******************************************************************************/
@@ -258,7 +259,7 @@ ACPI_EXPORT_SYMBOL(acpi_debug_print_raw)
258 * 259 *
259 * RETURN: None 260 * RETURN: None
260 * 261 *
261 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 262 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
262 * set in debug_level 263 * set in debug_level
263 * 264 *
264 ******************************************************************************/ 265 ******************************************************************************/
@@ -290,7 +291,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace)
290 * 291 *
291 * RETURN: None 292 * RETURN: None
292 * 293 *
293 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 294 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
294 * set in debug_level 295 * set in debug_level
295 * 296 *
296 ******************************************************************************/ 297 ******************************************************************************/
@@ -299,6 +300,7 @@ acpi_ut_trace_ptr(u32 line_number,
299 const char *function_name, 300 const char *function_name,
300 const char *module_name, u32 component_id, void *pointer) 301 const char *module_name, u32 component_id, void *pointer)
301{ 302{
303
302 acpi_gbl_nesting_level++; 304 acpi_gbl_nesting_level++;
303 acpi_ut_track_stack_ptr(); 305 acpi_ut_track_stack_ptr();
304 306
@@ -319,7 +321,7 @@ acpi_ut_trace_ptr(u32 line_number,
319 * 321 *
320 * RETURN: None 322 * RETURN: None
321 * 323 *
322 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 324 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
323 * set in debug_level 325 * set in debug_level
324 * 326 *
325 ******************************************************************************/ 327 ******************************************************************************/
@@ -350,7 +352,7 @@ acpi_ut_trace_str(u32 line_number,
350 * 352 *
351 * RETURN: None 353 * RETURN: None
352 * 354 *
353 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is 355 * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
354 * set in debug_level 356 * set in debug_level
355 * 357 *
356 ******************************************************************************/ 358 ******************************************************************************/
@@ -380,7 +382,7 @@ acpi_ut_trace_u32(u32 line_number,
380 * 382 *
381 * RETURN: None 383 * RETURN: None
382 * 384 *
383 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 385 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
384 * set in debug_level 386 * set in debug_level
385 * 387 *
386 ******************************************************************************/ 388 ******************************************************************************/
@@ -412,7 +414,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit)
412 * 414 *
413 * RETURN: None 415 * RETURN: None
414 * 416 *
415 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 417 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
416 * set in debug_level. Prints exit status also. 418 * set in debug_level. Prints exit status also.
417 * 419 *
418 ******************************************************************************/ 420 ******************************************************************************/
@@ -453,7 +455,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)
453 * 455 *
454 * RETURN: None 456 * RETURN: None
455 * 457 *
456 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 458 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
457 * set in debug_level. Prints exit value also. 459 * set in debug_level. Prints exit value also.
458 * 460 *
459 ******************************************************************************/ 461 ******************************************************************************/
@@ -485,7 +487,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)
485 * 487 *
486 * RETURN: None 488 * RETURN: None
487 * 489 *
488 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is 490 * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
489 * set in debug_level. Prints exit value also. 491 * set in debug_level. Prints exit value also.
490 * 492 *
491 ******************************************************************************/ 493 ******************************************************************************/
@@ -511,7 +513,7 @@ acpi_ut_ptr_exit(u32 line_number,
511 * PARAMETERS: buffer - Buffer to dump 513 * PARAMETERS: buffer - Buffer to dump
512 * count - Amount to dump, in bytes 514 * count - Amount to dump, in bytes
513 * display - BYTE, WORD, DWORD, or QWORD display 515 * display - BYTE, WORD, DWORD, or QWORD display
514 * component_ID - Caller's component ID 516 * offset - Beginning buffer offset (display only)
515 * 517 *
516 * RETURN: None 518 * RETURN: None
517 * 519 *
@@ -519,7 +521,7 @@ acpi_ut_ptr_exit(u32 line_number,
519 * 521 *
520 ******************************************************************************/ 522 ******************************************************************************/
521 523
522void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) 524void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
523{ 525{
524 u32 i = 0; 526 u32 i = 0;
525 u32 j; 527 u32 j;
@@ -541,7 +543,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
541 543
542 /* Print current offset */ 544 /* Print current offset */
543 545
544 acpi_os_printf("%6.4X: ", i); 546 acpi_os_printf("%6.4X: ", (base_offset + i));
545 547
546 /* Print 16 hex chars */ 548 /* Print 16 hex chars */
547 549
@@ -623,7 +625,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
623 625
624/******************************************************************************* 626/*******************************************************************************
625 * 627 *
626 * FUNCTION: acpi_ut_dump_buffer 628 * FUNCTION: acpi_ut_debug_dump_buffer
627 * 629 *
628 * PARAMETERS: buffer - Buffer to dump 630 * PARAMETERS: buffer - Buffer to dump
629 * count - Amount to dump, in bytes 631 * count - Amount to dump, in bytes
@@ -636,7 +638,8 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
636 * 638 *
637 ******************************************************************************/ 639 ******************************************************************************/
638 640
639void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id) 641void
642acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id)
640{ 643{
641 644
642 /* Only dump the buffer if tracing is enabled */ 645 /* Only dump the buffer if tracing is enabled */
@@ -646,5 +649,5 @@ void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id)
646 return; 649 return;
647 } 650 }
648 651
649 acpi_ut_dump_buffer2(buffer, count, display); 652 acpi_ut_dump_buffer(buffer, count, display, 0);
650} 653}