diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/acpi/acpica/utdebug.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'drivers/acpi/acpica/utdebug.c')
-rw-r--r-- | drivers/acpi/acpica/utdebug.c | 70 |
1 files changed, 33 insertions, 37 deletions
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index 5d95166245a..a9bcd816dc2 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2012, Intel Corp. | 8 | * Copyright (C) 2000 - 2011, Intel Corp. |
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 |
@@ -41,15 +41,13 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/export.h> | ||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include "accommon.h" | 45 | #include "accommon.h" |
47 | 46 | ||
48 | #define _COMPONENT ACPI_UTILITIES | 47 | #define _COMPONENT ACPI_UTILITIES |
49 | ACPI_MODULE_NAME("utdebug") | 48 | ACPI_MODULE_NAME("utdebug") |
50 | |||
51 | #ifdef ACPI_DEBUG_OUTPUT | 49 | #ifdef ACPI_DEBUG_OUTPUT |
52 | static acpi_thread_id acpi_gbl_prev_thread_id = (acpi_thread_id) 0xFFFFFFFF; | 50 | static acpi_thread_id acpi_gbl_prev_thread_id; |
53 | static char *acpi_gbl_fn_entry_str = "----Entry"; | 51 | static char *acpi_gbl_fn_entry_str = "----Entry"; |
54 | static char *acpi_gbl_fn_exit_str = "----Exit-"; | 52 | static char *acpi_gbl_fn_exit_str = "----Exit-"; |
55 | 53 | ||
@@ -110,7 +108,7 @@ void acpi_ut_track_stack_ptr(void) | |||
110 | * RETURN: Updated pointer to the function name | 108 | * RETURN: Updated pointer to the function name |
111 | * | 109 | * |
112 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. | 110 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. |
113 | * This allows compiler macros such as __FUNCTION__ to be used | 111 | * This allows compiler macros such as __func__ to be used |
114 | * with no change to the debug output. | 112 | * with no change to the debug output. |
115 | * | 113 | * |
116 | ******************************************************************************/ | 114 | ******************************************************************************/ |
@@ -146,7 +144,7 @@ static const char *acpi_ut_trim_function_name(const char *function_name) | |||
146 | * function_name - Caller's procedure name | 144 | * function_name - Caller's procedure name |
147 | * module_name - Caller's module name | 145 | * module_name - Caller's module name |
148 | * component_id - Caller's component ID | 146 | * component_id - Caller's component ID |
149 | * format - Printf format field | 147 | * Format - Printf format field |
150 | * ... - Optional printf arguments | 148 | * ... - Optional printf arguments |
151 | * | 149 | * |
152 | * RETURN: None | 150 | * RETURN: None |
@@ -218,12 +216,12 @@ ACPI_EXPORT_SYMBOL(acpi_debug_print) | |||
218 | * function_name - Caller's procedure name | 216 | * function_name - Caller's procedure name |
219 | * module_name - Caller's module name | 217 | * module_name - Caller's module name |
220 | * component_id - Caller's component ID | 218 | * component_id - Caller's component ID |
221 | * format - Printf format field | 219 | * Format - Printf format field |
222 | * ... - Optional printf arguments | 220 | * ... - Optional printf arguments |
223 | * | 221 | * |
224 | * RETURN: None | 222 | * RETURN: None |
225 | * | 223 | * |
226 | * DESCRIPTION: Print message with no headers. Has same interface as | 224 | * DESCRIPTION: Print message with no headers. Has same interface as |
227 | * debug_print so that the same macros can be used. | 225 | * debug_print so that the same macros can be used. |
228 | * | 226 | * |
229 | ******************************************************************************/ | 227 | ******************************************************************************/ |
@@ -259,7 +257,7 @@ ACPI_EXPORT_SYMBOL(acpi_debug_print_raw) | |||
259 | * | 257 | * |
260 | * RETURN: None | 258 | * RETURN: None |
261 | * | 259 | * |
262 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is | 260 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is |
263 | * set in debug_level | 261 | * set in debug_level |
264 | * | 262 | * |
265 | ******************************************************************************/ | 263 | ******************************************************************************/ |
@@ -287,11 +285,11 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace) | |||
287 | * function_name - Caller's procedure name | 285 | * function_name - Caller's procedure name |
288 | * module_name - Caller's module name | 286 | * module_name - Caller's module name |
289 | * component_id - Caller's component ID | 287 | * component_id - Caller's component ID |
290 | * pointer - Pointer to display | 288 | * Pointer - Pointer to display |
291 | * | 289 | * |
292 | * RETURN: None | 290 | * RETURN: None |
293 | * | 291 | * |
294 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is | 292 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is |
295 | * set in debug_level | 293 | * set in debug_level |
296 | * | 294 | * |
297 | ******************************************************************************/ | 295 | ******************************************************************************/ |
@@ -300,7 +298,6 @@ acpi_ut_trace_ptr(u32 line_number, | |||
300 | const char *function_name, | 298 | const char *function_name, |
301 | const char *module_name, u32 component_id, void *pointer) | 299 | const char *module_name, u32 component_id, void *pointer) |
302 | { | 300 | { |
303 | |||
304 | acpi_gbl_nesting_level++; | 301 | acpi_gbl_nesting_level++; |
305 | acpi_ut_track_stack_ptr(); | 302 | acpi_ut_track_stack_ptr(); |
306 | 303 | ||
@@ -317,11 +314,11 @@ acpi_ut_trace_ptr(u32 line_number, | |||
317 | * function_name - Caller's procedure name | 314 | * function_name - Caller's procedure name |
318 | * module_name - Caller's module name | 315 | * module_name - Caller's module name |
319 | * component_id - Caller's component ID | 316 | * component_id - Caller's component ID |
320 | * string - Additional string to display | 317 | * String - Additional string to display |
321 | * | 318 | * |
322 | * RETURN: None | 319 | * RETURN: None |
323 | * | 320 | * |
324 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is | 321 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is |
325 | * set in debug_level | 322 | * set in debug_level |
326 | * | 323 | * |
327 | ******************************************************************************/ | 324 | ******************************************************************************/ |
@@ -348,11 +345,11 @@ acpi_ut_trace_str(u32 line_number, | |||
348 | * function_name - Caller's procedure name | 345 | * function_name - Caller's procedure name |
349 | * module_name - Caller's module name | 346 | * module_name - Caller's module name |
350 | * component_id - Caller's component ID | 347 | * component_id - Caller's component ID |
351 | * integer - Integer to display | 348 | * Integer - Integer to display |
352 | * | 349 | * |
353 | * RETURN: None | 350 | * RETURN: None |
354 | * | 351 | * |
355 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is | 352 | * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is |
356 | * set in debug_level | 353 | * set in debug_level |
357 | * | 354 | * |
358 | ******************************************************************************/ | 355 | ******************************************************************************/ |
@@ -382,7 +379,7 @@ acpi_ut_trace_u32(u32 line_number, | |||
382 | * | 379 | * |
383 | * RETURN: None | 380 | * RETURN: None |
384 | * | 381 | * |
385 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is | 382 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is |
386 | * set in debug_level | 383 | * set in debug_level |
387 | * | 384 | * |
388 | ******************************************************************************/ | 385 | ******************************************************************************/ |
@@ -410,11 +407,11 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit) | |||
410 | * function_name - Caller's procedure name | 407 | * function_name - Caller's procedure name |
411 | * module_name - Caller's module name | 408 | * module_name - Caller's module name |
412 | * component_id - Caller's component ID | 409 | * component_id - Caller's component ID |
413 | * status - Exit status code | 410 | * Status - Exit status code |
414 | * | 411 | * |
415 | * RETURN: None | 412 | * RETURN: None |
416 | * | 413 | * |
417 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is | 414 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is |
418 | * set in debug_level. Prints exit status also. | 415 | * set in debug_level. Prints exit status also. |
419 | * | 416 | * |
420 | ******************************************************************************/ | 417 | ******************************************************************************/ |
@@ -451,11 +448,11 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) | |||
451 | * function_name - Caller's procedure name | 448 | * function_name - Caller's procedure name |
452 | * module_name - Caller's module name | 449 | * module_name - Caller's module name |
453 | * component_id - Caller's component ID | 450 | * component_id - Caller's component ID |
454 | * value - Value to be printed with exit msg | 451 | * Value - Value to be printed with exit msg |
455 | * | 452 | * |
456 | * RETURN: None | 453 | * RETURN: None |
457 | * | 454 | * |
458 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is | 455 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is |
459 | * set in debug_level. Prints exit value also. | 456 | * set in debug_level. Prints exit value also. |
460 | * | 457 | * |
461 | ******************************************************************************/ | 458 | ******************************************************************************/ |
@@ -483,11 +480,11 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) | |||
483 | * function_name - Caller's procedure name | 480 | * function_name - Caller's procedure name |
484 | * module_name - Caller's module name | 481 | * module_name - Caller's module name |
485 | * component_id - Caller's component ID | 482 | * component_id - Caller's component ID |
486 | * ptr - Pointer to display | 483 | * Ptr - Pointer to display |
487 | * | 484 | * |
488 | * RETURN: None | 485 | * RETURN: None |
489 | * | 486 | * |
490 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is | 487 | * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is |
491 | * set in debug_level. Prints exit value also. | 488 | * set in debug_level. Prints exit value also. |
492 | * | 489 | * |
493 | ******************************************************************************/ | 490 | ******************************************************************************/ |
@@ -510,10 +507,10 @@ acpi_ut_ptr_exit(u32 line_number, | |||
510 | * | 507 | * |
511 | * FUNCTION: acpi_ut_dump_buffer | 508 | * FUNCTION: acpi_ut_dump_buffer |
512 | * | 509 | * |
513 | * PARAMETERS: buffer - Buffer to dump | 510 | * PARAMETERS: Buffer - Buffer to dump |
514 | * count - Amount to dump, in bytes | 511 | * Count - Amount to dump, in bytes |
515 | * display - BYTE, WORD, DWORD, or QWORD display | 512 | * Display - BYTE, WORD, DWORD, or QWORD display |
516 | * offset - Beginning buffer offset (display only) | 513 | * component_iD - Caller's component ID |
517 | * | 514 | * |
518 | * RETURN: None | 515 | * RETURN: None |
519 | * | 516 | * |
@@ -521,7 +518,7 @@ acpi_ut_ptr_exit(u32 line_number, | |||
521 | * | 518 | * |
522 | ******************************************************************************/ | 519 | ******************************************************************************/ |
523 | 520 | ||
524 | void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset) | 521 | void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) |
525 | { | 522 | { |
526 | u32 i = 0; | 523 | u32 i = 0; |
527 | u32 j; | 524 | u32 j; |
@@ -543,7 +540,7 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset) | |||
543 | 540 | ||
544 | /* Print current offset */ | 541 | /* Print current offset */ |
545 | 542 | ||
546 | acpi_os_printf("%6.4X: ", (base_offset + i)); | 543 | acpi_os_printf("%6.4X: ", i); |
547 | 544 | ||
548 | /* Print 16 hex chars */ | 545 | /* Print 16 hex chars */ |
549 | 546 | ||
@@ -625,12 +622,12 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset) | |||
625 | 622 | ||
626 | /******************************************************************************* | 623 | /******************************************************************************* |
627 | * | 624 | * |
628 | * FUNCTION: acpi_ut_debug_dump_buffer | 625 | * FUNCTION: acpi_ut_dump_buffer |
629 | * | 626 | * |
630 | * PARAMETERS: buffer - Buffer to dump | 627 | * PARAMETERS: Buffer - Buffer to dump |
631 | * count - Amount to dump, in bytes | 628 | * Count - Amount to dump, in bytes |
632 | * display - BYTE, WORD, DWORD, or QWORD display | 629 | * Display - BYTE, WORD, DWORD, or QWORD display |
633 | * component_ID - Caller's component ID | 630 | * component_iD - Caller's component ID |
634 | * | 631 | * |
635 | * RETURN: None | 632 | * RETURN: None |
636 | * | 633 | * |
@@ -638,8 +635,7 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset) | |||
638 | * | 635 | * |
639 | ******************************************************************************/ | 636 | ******************************************************************************/ |
640 | 637 | ||
641 | void | 638 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id) |
642 | acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id) | ||
643 | { | 639 | { |
644 | 640 | ||
645 | /* Only dump the buffer if tracing is enabled */ | 641 | /* Only dump the buffer if tracing is enabled */ |
@@ -649,5 +645,5 @@ acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id) | |||
649 | return; | 645 | return; |
650 | } | 646 | } |
651 | 647 | ||
652 | acpi_ut_dump_buffer(buffer, count, display, 0); | 648 | acpi_ut_dump_buffer2(buffer, count, display); |
653 | } | 649 | } |