diff options
Diffstat (limited to 'drivers/acpi/namespace/nsdump.c')
-rw-r--r-- | drivers/acpi/namespace/nsdump.c | 109 |
1 files changed, 67 insertions, 42 deletions
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index 1f6af3eb6c91..6c2aef0e0dd4 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c | |||
@@ -50,16 +50,32 @@ | |||
50 | #define _COMPONENT ACPI_NAMESPACE | 50 | #define _COMPONENT ACPI_NAMESPACE |
51 | ACPI_MODULE_NAME ("nsdump") | 51 | ACPI_MODULE_NAME ("nsdump") |
52 | 52 | ||
53 | /* Local prototypes */ | ||
53 | 54 | ||
54 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 55 | #ifdef ACPI_OBSOLETE_FUNCTIONS |
56 | void | ||
57 | acpi_ns_dump_root_devices ( | ||
58 | void); | ||
55 | 59 | ||
60 | static acpi_status | ||
61 | acpi_ns_dump_one_device ( | ||
62 | acpi_handle obj_handle, | ||
63 | u32 level, | ||
64 | void *context, | ||
65 | void **return_value); | ||
66 | #endif | ||
67 | |||
68 | |||
69 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | ||
56 | /******************************************************************************* | 70 | /******************************************************************************* |
57 | * | 71 | * |
58 | * FUNCTION: acpi_ns_print_pathname | 72 | * FUNCTION: acpi_ns_print_pathname |
59 | * | 73 | * |
60 | * PARAMETERS: num_segment - Number of ACPI name segments | 74 | * PARAMETERS: num_segments - Number of ACPI name segments |
61 | * Pathname - The compressed (internal) path | 75 | * Pathname - The compressed (internal) path |
62 | * | 76 | * |
77 | * RETURN: None | ||
78 | * | ||
63 | * DESCRIPTION: Print an object's full namespace pathname | 79 | * DESCRIPTION: Print an object's full namespace pathname |
64 | * | 80 | * |
65 | ******************************************************************************/ | 81 | ******************************************************************************/ |
@@ -103,6 +119,8 @@ acpi_ns_print_pathname ( | |||
103 | * Level - Desired debug level | 119 | * Level - Desired debug level |
104 | * Component - Caller's component ID | 120 | * Component - Caller's component ID |
105 | * | 121 | * |
122 | * RETURN: None | ||
123 | * | ||
106 | * DESCRIPTION: Print an object's full namespace pathname | 124 | * DESCRIPTION: Print an object's full namespace pathname |
107 | * Manages allocation/freeing of a pathname buffer | 125 | * Manages allocation/freeing of a pathname buffer |
108 | * | 126 | * |
@@ -137,9 +155,12 @@ acpi_ns_dump_pathname ( | |||
137 | * | 155 | * |
138 | * FUNCTION: acpi_ns_dump_one_object | 156 | * FUNCTION: acpi_ns_dump_one_object |
139 | * | 157 | * |
140 | * PARAMETERS: Handle - Node to be dumped | 158 | * PARAMETERS: obj_handle - Node to be dumped |
141 | * Level - Nesting level of the handle | 159 | * Level - Nesting level of the handle |
142 | * Context - Passed into walk_namespace | 160 | * Context - Passed into walk_namespace |
161 | * return_value - Not used | ||
162 | * | ||
163 | * RETURN: Status | ||
143 | * | 164 | * |
144 | * DESCRIPTION: Dump a single Node | 165 | * DESCRIPTION: Dump a single Node |
145 | * This procedure is a user_function called by acpi_ns_walk_namespace. | 166 | * This procedure is a user_function called by acpi_ns_walk_namespace. |
@@ -394,8 +415,7 @@ acpi_ns_dump_one_object ( | |||
394 | return (AE_OK); | 415 | return (AE_OK); |
395 | } | 416 | } |
396 | 417 | ||
397 | acpi_os_printf ("(R%d)", | 418 | acpi_os_printf ("(R%d)", obj_desc->common.reference_count); |
398 | obj_desc->common.reference_count); | ||
399 | 419 | ||
400 | switch (type) { | 420 | switch (type) { |
401 | case ACPI_TYPE_METHOD: | 421 | case ACPI_TYPE_METHOD: |
@@ -551,18 +571,20 @@ cleanup: | |||
551 | 571 | ||
552 | 572 | ||
553 | #ifdef ACPI_FUTURE_USAGE | 573 | #ifdef ACPI_FUTURE_USAGE |
554 | |||
555 | /******************************************************************************* | 574 | /******************************************************************************* |
556 | * | 575 | * |
557 | * FUNCTION: acpi_ns_dump_objects | 576 | * FUNCTION: acpi_ns_dump_objects |
558 | * | 577 | * |
559 | * PARAMETERS: Type - Object type to be dumped | 578 | * PARAMETERS: Type - Object type to be dumped |
579 | * display_type - 0 or ACPI_DISPLAY_SUMMARY | ||
560 | * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX | 580 | * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX |
561 | * for an effectively unlimited depth. | 581 | * for an effectively unlimited depth. |
562 | * owner_id - Dump only objects owned by this ID. Use | 582 | * owner_id - Dump only objects owned by this ID. Use |
563 | * ACPI_UINT32_MAX to match all owners. | 583 | * ACPI_UINT32_MAX to match all owners. |
564 | * start_handle - Where in namespace to start/end search | 584 | * start_handle - Where in namespace to start/end search |
565 | * | 585 | * |
586 | * RETURN: None | ||
587 | * | ||
566 | * DESCRIPTION: Dump typed objects within the loaded namespace. | 588 | * DESCRIPTION: Dump typed objects within the loaded namespace. |
567 | * Uses acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object. | 589 | * Uses acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object. |
568 | * | 590 | * |
@@ -590,10 +612,44 @@ acpi_ns_dump_objects ( | |||
590 | ACPI_NS_WALK_NO_UNLOCK, acpi_ns_dump_one_object, | 612 | ACPI_NS_WALK_NO_UNLOCK, acpi_ns_dump_one_object, |
591 | (void *) &info, NULL); | 613 | (void *) &info, NULL); |
592 | } | 614 | } |
615 | #endif /* ACPI_FUTURE_USAGE */ | ||
593 | 616 | ||
594 | 617 | ||
595 | /******************************************************************************* | 618 | /******************************************************************************* |
596 | * | 619 | * |
620 | * FUNCTION: acpi_ns_dump_entry | ||
621 | * | ||
622 | * PARAMETERS: Handle - Node to be dumped | ||
623 | * debug_level - Output level | ||
624 | * | ||
625 | * RETURN: None | ||
626 | * | ||
627 | * DESCRIPTION: Dump a single Node | ||
628 | * | ||
629 | ******************************************************************************/ | ||
630 | |||
631 | void | ||
632 | acpi_ns_dump_entry ( | ||
633 | acpi_handle handle, | ||
634 | u32 debug_level) | ||
635 | { | ||
636 | struct acpi_walk_info info; | ||
637 | |||
638 | |||
639 | ACPI_FUNCTION_ENTRY (); | ||
640 | |||
641 | |||
642 | info.debug_level = debug_level; | ||
643 | info.owner_id = ACPI_UINT32_MAX; | ||
644 | info.display_type = ACPI_DISPLAY_SUMMARY; | ||
645 | |||
646 | (void) acpi_ns_dump_one_object (handle, 1, &info, NULL); | ||
647 | } | ||
648 | |||
649 | |||
650 | #ifdef _ACPI_ASL_COMPILER | ||
651 | /******************************************************************************* | ||
652 | * | ||
597 | * FUNCTION: acpi_ns_dump_tables | 653 | * FUNCTION: acpi_ns_dump_tables |
598 | * | 654 | * |
599 | * PARAMETERS: search_base - Root of subtree to be dumped, or | 655 | * PARAMETERS: search_base - Root of subtree to be dumped, or |
@@ -601,6 +657,8 @@ acpi_ns_dump_objects ( | |||
601 | * max_depth - Maximum depth of dump. Use INT_MAX | 657 | * max_depth - Maximum depth of dump. Use INT_MAX |
602 | * for an effectively unlimited depth. | 658 | * for an effectively unlimited depth. |
603 | * | 659 | * |
660 | * RETURN: None | ||
661 | * | ||
604 | * DESCRIPTION: Dump the name space, or a portion of it. | 662 | * DESCRIPTION: Dump the name space, or a portion of it. |
605 | * | 663 | * |
606 | ******************************************************************************/ | 664 | ******************************************************************************/ |
@@ -626,7 +684,7 @@ acpi_ns_dump_tables ( | |||
626 | } | 684 | } |
627 | 685 | ||
628 | if (ACPI_NS_ALL == search_base) { | 686 | if (ACPI_NS_ALL == search_base) { |
629 | /* entire namespace */ | 687 | /* Entire namespace */ |
630 | 688 | ||
631 | search_handle = acpi_gbl_root_node; | 689 | search_handle = acpi_gbl_root_node; |
632 | ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n")); | 690 | ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n")); |
@@ -636,38 +694,5 @@ acpi_ns_dump_tables ( | |||
636 | ACPI_UINT32_MAX, search_handle); | 694 | ACPI_UINT32_MAX, search_handle); |
637 | return_VOID; | 695 | return_VOID; |
638 | } | 696 | } |
639 | 697 | #endif /* _ACPI_ASL_COMPILER */ | |
640 | #endif /* ACPI_FUTURE_USAGE */ | 698 | #endif /* defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) */ |
641 | |||
642 | |||
643 | /******************************************************************************* | ||
644 | * | ||
645 | * FUNCTION: acpi_ns_dump_entry | ||
646 | * | ||
647 | * PARAMETERS: Handle - Node to be dumped | ||
648 | * debug_level - Output level | ||
649 | * | ||
650 | * DESCRIPTION: Dump a single Node | ||
651 | * | ||
652 | ******************************************************************************/ | ||
653 | |||
654 | void | ||
655 | acpi_ns_dump_entry ( | ||
656 | acpi_handle handle, | ||
657 | u32 debug_level) | ||
658 | { | ||
659 | struct acpi_walk_info info; | ||
660 | |||
661 | |||
662 | ACPI_FUNCTION_ENTRY (); | ||
663 | |||
664 | |||
665 | info.debug_level = debug_level; | ||
666 | info.owner_id = ACPI_UINT32_MAX; | ||
667 | info.display_type = ACPI_DISPLAY_SUMMARY; | ||
668 | |||
669 | (void) acpi_ns_dump_one_object (handle, 1, &info, NULL); | ||
670 | } | ||
671 | |||
672 | #endif | ||
673 | |||