aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utdebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/utdebug.c')
-rw-r--r--drivers/acpi/utilities/utdebug.c54
1 files changed, 33 insertions, 21 deletions
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
index f938f465efa4..fd66ecb6741e 100644
--- a/drivers/acpi/utilities/utdebug.c
+++ b/drivers/acpi/utilities/utdebug.c
@@ -157,7 +157,8 @@ void ACPI_INTERNAL_VAR_XFACE
157acpi_ut_debug_print(u32 requested_debug_level, 157acpi_ut_debug_print(u32 requested_debug_level,
158 u32 line_number, 158 u32 line_number,
159 const char *function_name, 159 const char *function_name,
160 char *module_name, u32 component_id, char *format, ...) 160 const char *module_name,
161 u32 component_id, const char *format, ...)
161{ 162{
162 acpi_thread_id thread_id; 163 acpi_thread_id thread_id;
163 va_list args; 164 va_list args;
@@ -228,7 +229,8 @@ void ACPI_INTERNAL_VAR_XFACE
228acpi_ut_debug_print_raw(u32 requested_debug_level, 229acpi_ut_debug_print_raw(u32 requested_debug_level,
229 u32 line_number, 230 u32 line_number,
230 const char *function_name, 231 const char *function_name,
231 char *module_name, u32 component_id, char *format, ...) 232 const char *module_name,
233 u32 component_id, const char *format, ...)
232{ 234{
233 va_list args; 235 va_list args;
234 236
@@ -261,7 +263,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw)
261 ******************************************************************************/ 263 ******************************************************************************/
262void 264void
263acpi_ut_trace(u32 line_number, 265acpi_ut_trace(u32 line_number,
264 const char *function_name, char *module_name, u32 component_id) 266 const char *function_name,
267 const char *module_name, u32 component_id)
265{ 268{
266 269
267 acpi_gbl_nesting_level++; 270 acpi_gbl_nesting_level++;
@@ -293,7 +296,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace)
293void 296void
294acpi_ut_trace_ptr(u32 line_number, 297acpi_ut_trace_ptr(u32 line_number,
295 const char *function_name, 298 const char *function_name,
296 char *module_name, u32 component_id, void *pointer) 299 const char *module_name, u32 component_id, void *pointer)
297{ 300{
298 acpi_gbl_nesting_level++; 301 acpi_gbl_nesting_level++;
299 acpi_ut_track_stack_ptr(); 302 acpi_ut_track_stack_ptr();
@@ -324,7 +327,7 @@ acpi_ut_trace_ptr(u32 line_number,
324void 327void
325acpi_ut_trace_str(u32 line_number, 328acpi_ut_trace_str(u32 line_number,
326 const char *function_name, 329 const char *function_name,
327 char *module_name, u32 component_id, char *string) 330 const char *module_name, u32 component_id, char *string)
328{ 331{
329 332
330 acpi_gbl_nesting_level++; 333 acpi_gbl_nesting_level++;
@@ -356,7 +359,7 @@ acpi_ut_trace_str(u32 line_number,
356void 359void
357acpi_ut_trace_u32(u32 line_number, 360acpi_ut_trace_u32(u32 line_number,
358 const char *function_name, 361 const char *function_name,
359 char *module_name, u32 component_id, u32 integer) 362 const char *module_name, u32 component_id, u32 integer)
360{ 363{
361 364
362 acpi_gbl_nesting_level++; 365 acpi_gbl_nesting_level++;
@@ -386,7 +389,8 @@ acpi_ut_trace_u32(u32 line_number,
386 389
387void 390void
388acpi_ut_exit(u32 line_number, 391acpi_ut_exit(u32 line_number,
389 const char *function_name, char *module_name, u32 component_id) 392 const char *function_name,
393 const char *module_name, u32 component_id)
390{ 394{
391 395
392 acpi_ut_debug_print(ACPI_LV_FUNCTIONS, 396 acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
@@ -417,7 +421,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit)
417void 421void
418acpi_ut_status_exit(u32 line_number, 422acpi_ut_status_exit(u32 line_number,
419 const char *function_name, 423 const char *function_name,
420 char *module_name, u32 component_id, acpi_status status) 424 const char *module_name,
425 u32 component_id, acpi_status status)
421{ 426{
422 427
423 if (ACPI_SUCCESS(status)) { 428 if (ACPI_SUCCESS(status)) {
@@ -458,7 +463,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)
458void 463void
459acpi_ut_value_exit(u32 line_number, 464acpi_ut_value_exit(u32 line_number,
460 const char *function_name, 465 const char *function_name,
461 char *module_name, u32 component_id, acpi_integer value) 466 const char *module_name,
467 u32 component_id, acpi_integer value)
462{ 468{
463 469
464 acpi_ut_debug_print(ACPI_LV_FUNCTIONS, 470 acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
@@ -490,7 +496,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)
490void 496void
491acpi_ut_ptr_exit(u32 line_number, 497acpi_ut_ptr_exit(u32 line_number,
492 const char *function_name, 498 const char *function_name,
493 char *module_name, u32 component_id, u8 * ptr) 499 const char *module_name, u32 component_id, u8 *ptr)
494{ 500{
495 501
496 acpi_ut_debug_print(ACPI_LV_FUNCTIONS, 502 acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
@@ -519,8 +525,8 @@ acpi_ut_ptr_exit(u32 line_number,
519 525
520void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) 526void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
521{ 527{
522 acpi_native_uint i = 0; 528 u32 i = 0;
523 acpi_native_uint j; 529 u32 j;
524 u32 temp32; 530 u32 temp32;
525 u8 buf_char; 531 u8 buf_char;
526 532
@@ -539,7 +545,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
539 545
540 /* Print current offset */ 546 /* Print current offset */
541 547
542 acpi_os_printf("%6.4X: ", (u32) i); 548 acpi_os_printf("%6.4X: ", i);
543 549
544 /* Print 16 hex chars */ 550 /* Print 16 hex chars */
545 551
@@ -549,7 +555,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
549 /* Dump fill spaces */ 555 /* Dump fill spaces */
550 556
551 acpi_os_printf("%*s", ((display * 2) + 1), " "); 557 acpi_os_printf("%*s", ((display * 2) + 1), " ");
552 j += (acpi_native_uint) display; 558 j += display;
553 continue; 559 continue;
554 } 560 }
555 561
@@ -557,32 +563,38 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
557 case DB_BYTE_DISPLAY: 563 case DB_BYTE_DISPLAY:
558 default: /* Default is BYTE display */ 564 default: /* Default is BYTE display */
559 565
560 acpi_os_printf("%02X ", buffer[i + j]); 566 acpi_os_printf("%02X ",
567 buffer[(acpi_size) i + j]);
561 break; 568 break;
562 569
563 case DB_WORD_DISPLAY: 570 case DB_WORD_DISPLAY:
564 571
565 ACPI_MOVE_16_TO_32(&temp32, &buffer[i + j]); 572 ACPI_MOVE_16_TO_32(&temp32,
573 &buffer[(acpi_size) i + j]);
566 acpi_os_printf("%04X ", temp32); 574 acpi_os_printf("%04X ", temp32);
567 break; 575 break;
568 576
569 case DB_DWORD_DISPLAY: 577 case DB_DWORD_DISPLAY:
570 578
571 ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]); 579 ACPI_MOVE_32_TO_32(&temp32,
580 &buffer[(acpi_size) i + j]);
572 acpi_os_printf("%08X ", temp32); 581 acpi_os_printf("%08X ", temp32);
573 break; 582 break;
574 583
575 case DB_QWORD_DISPLAY: 584 case DB_QWORD_DISPLAY:
576 585
577 ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j]); 586 ACPI_MOVE_32_TO_32(&temp32,
587 &buffer[(acpi_size) i + j]);
578 acpi_os_printf("%08X", temp32); 588 acpi_os_printf("%08X", temp32);
579 589
580 ACPI_MOVE_32_TO_32(&temp32, &buffer[i + j + 4]); 590 ACPI_MOVE_32_TO_32(&temp32,
591 &buffer[(acpi_size) i + j +
592 4]);
581 acpi_os_printf("%08X ", temp32); 593 acpi_os_printf("%08X ", temp32);
582 break; 594 break;
583 } 595 }
584 596
585 j += (acpi_native_uint) display; 597 j += display;
586 } 598 }
587 599
588 /* 600 /*
@@ -596,7 +608,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
596 return; 608 return;
597 } 609 }
598 610
599 buf_char = buffer[i + j]; 611 buf_char = buffer[(acpi_size) i + j];
600 if (ACPI_IS_PRINT(buf_char)) { 612 if (ACPI_IS_PRINT(buf_char)) {
601 acpi_os_printf("%c", buf_char); 613 acpi_os_printf("%c", buf_char);
602 } else { 614 } else {