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..4550e6f9809b 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 | * |
@@ -594,6 +616,39 @@ acpi_ns_dump_objects ( | |||
594 | 616 | ||
595 | /******************************************************************************* | 617 | /******************************************************************************* |
596 | * | 618 | * |
619 | * FUNCTION: acpi_ns_dump_entry | ||
620 | * | ||
621 | * PARAMETERS: Handle - Node to be dumped | ||
622 | * debug_level - Output level | ||
623 | * | ||
624 | * RETURN: None | ||
625 | * | ||
626 | * DESCRIPTION: Dump a single Node | ||
627 | * | ||
628 | ******************************************************************************/ | ||
629 | |||
630 | void | ||
631 | acpi_ns_dump_entry ( | ||
632 | acpi_handle handle, | ||
633 | u32 debug_level) | ||
634 | { | ||
635 | struct acpi_walk_info info; | ||
636 | |||
637 | |||
638 | ACPI_FUNCTION_ENTRY (); | ||
639 | |||
640 | |||
641 | info.debug_level = debug_level; | ||
642 | info.owner_id = ACPI_UINT32_MAX; | ||
643 | info.display_type = ACPI_DISPLAY_SUMMARY; | ||
644 | |||
645 | (void) acpi_ns_dump_one_object (handle, 1, &info, NULL); | ||
646 | } | ||
647 | |||
648 | |||
649 | #ifdef _ACPI_ASL_COMPILER | ||
650 | /******************************************************************************* | ||
651 | * | ||
597 | * FUNCTION: acpi_ns_dump_tables | 652 | * FUNCTION: acpi_ns_dump_tables |
598 | * | 653 | * |
599 | * PARAMETERS: search_base - Root of subtree to be dumped, or | 654 | * PARAMETERS: search_base - Root of subtree to be dumped, or |
@@ -601,6 +656,8 @@ acpi_ns_dump_objects ( | |||
601 | * max_depth - Maximum depth of dump. Use INT_MAX | 656 | * max_depth - Maximum depth of dump. Use INT_MAX |
602 | * for an effectively unlimited depth. | 657 | * for an effectively unlimited depth. |
603 | * | 658 | * |
659 | * RETURN: None | ||
660 | * | ||
604 | * DESCRIPTION: Dump the name space, or a portion of it. | 661 | * DESCRIPTION: Dump the name space, or a portion of it. |
605 | * | 662 | * |
606 | ******************************************************************************/ | 663 | ******************************************************************************/ |
@@ -626,7 +683,7 @@ acpi_ns_dump_tables ( | |||
626 | } | 683 | } |
627 | 684 | ||
628 | if (ACPI_NS_ALL == search_base) { | 685 | if (ACPI_NS_ALL == search_base) { |
629 | /* entire namespace */ | 686 | /* Entire namespace */ |
630 | 687 | ||
631 | search_handle = acpi_gbl_root_node; | 688 | search_handle = acpi_gbl_root_node; |
632 | ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n")); | 689 | ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "\\\n")); |
@@ -636,38 +693,6 @@ acpi_ns_dump_tables ( | |||
636 | ACPI_UINT32_MAX, search_handle); | 693 | ACPI_UINT32_MAX, search_handle); |
637 | return_VOID; | 694 | return_VOID; |
638 | } | 695 | } |
639 | 696 | #endif /* _ACPI_ASL_COMPILER */ | |
640 | #endif /* ACPI_FUTURE_USAGE */ | 697 | #endif /* ACPI_FUTURE_USAGE */ |
641 | 698 | #endif /* defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) */ | |
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 | |||