]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/namespace/nsdump.c
Merge branch 'ec' into test
[linux-2.6-omap-h63xx.git] / drivers / acpi / namespace / nsdump.c
index a2807317a84b0295a514f9bbfbd12d071fa73ae6..cc0ae39440e4358838626c73c63d43ccc8e15d01 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,6 @@
 
 #include <acpi/acpi.h>
 #include <acpi/acnamesp.h>
-#include <acpi/acparser.h>
 
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nsdump")
@@ -73,9 +72,9 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,
 
 void acpi_ns_print_pathname(u32 num_segments, char *pathname)
 {
-       acpi_native_uint i;
+       u32 i;
 
-       ACPI_FUNCTION_NAME("ns_print_pathname");
+       ACPI_FUNCTION_NAME(ns_print_pathname);
 
        if (!(acpi_dbg_level & ACPI_LV_NAMES)
            || !(acpi_dbg_layer & ACPI_NAMESPACE)) {
@@ -123,7 +122,7 @@ void
 acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component)
 {
 
-       ACPI_FUNCTION_TRACE("ns_dump_pathname");
+       ACPI_FUNCTION_TRACE(ns_dump_pathname);
 
        /* Do this only if the requested debug level and component are enabled */
 
@@ -167,7 +166,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
        u32 dbg_level;
        u32 i;
 
-       ACPI_FUNCTION_NAME("ns_dump_one_object");
+       ACPI_FUNCTION_NAME(ns_dump_one_object);
 
        /* Is output enabled? */
 
@@ -191,6 +190,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
        }
 
        if (!(info->display_type & ACPI_DISPLAY_SHORT)) {
+
                /* Indent the object according to the level */
 
                acpi_os_printf("%2d%*s", (u32) level - 1, (int)level * 2, " ");
@@ -203,6 +203,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                }
 
                if (!acpi_ut_valid_acpi_name(this_node->name.integer)) {
+                       this_node->name.integer =
+                           acpi_ut_repair_name(this_node->name.ascii);
+
                        ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X",
                                      this_node->name.integer));
                }
@@ -222,10 +225,17 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
        obj_desc = acpi_ns_get_attached_object(this_node);
        acpi_dbg_level = dbg_level;
 
+       /* Temp nodes are those nodes created by a control method */
+
+       if (this_node->flags & ANOBJ_TEMPORARY) {
+               acpi_os_printf("(T) ");
+       }
+
        switch (info->display_type & ACPI_DISPLAY_MASK) {
        case ACPI_DISPLAY_SUMMARY:
 
                if (!obj_desc) {
+
                        /* No attached object, we are done */
 
                        acpi_os_printf("\n");
@@ -238,7 +248,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                        acpi_os_printf("ID %X Len %.4X Addr %p\n",
                                       obj_desc->processor.proc_id,
                                       obj_desc->processor.length,
-                                      (char *)obj_desc->processor.address);
+                                      ACPI_CAST_PTR(void,
+                                                    obj_desc->processor.
+                                                    address));
                        break;
 
                case ACPI_TYPE_DEVICE:
@@ -309,9 +321,8 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                                                               space_id));
                        if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
                                acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
-                                              ACPI_FORMAT_UINT64(obj_desc->
-                                                                 region.
-                                                                 address),
+                                              ACPI_FORMAT_NATIVE_UINT
+                                              (obj_desc->region.address),
                                               obj_desc->region.length);
                        } else {
                                acpi_os_printf
@@ -322,9 +333,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                case ACPI_TYPE_LOCAL_REFERENCE:
 
                        acpi_os_printf("[%s]\n",
-                                      acpi_ps_get_opcode_name(obj_desc->
-                                                              reference.
-                                                              opcode));
+                                      acpi_ut_get_reference_name(obj_desc));
                        break;
 
                case ACPI_TYPE_BUFFER_FIELD:
@@ -419,6 +428,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 
                acpi_os_printf("O:%p", obj_desc);
                if (!obj_desc) {
+
                        /* No attached object, we are done */
 
                        acpi_os_printf("\n");
@@ -502,12 +512,12 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 
                        if (obj_type > ACPI_TYPE_LOCAL_MAX) {
                                acpi_os_printf
-                                   ("(Ptr to ACPI Object type %X [UNKNOWN])\n",
+                                   ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
                                     obj_type);
                                bytes_to_dump = 32;
                        } else {
                                acpi_os_printf
-                                   ("(Ptr to ACPI Object type %X [%s])\n",
+                                   ("(Pointer to ACPI Object type %.2X [%s])\n",
                                     obj_type, acpi_ut_get_type_name(obj_type));
                                bytes_to_dump =
                                    sizeof(union acpi_operand_object);
@@ -617,7 +627,8 @@ acpi_ns_dump_objects(acpi_object_type type,
        info.display_type = display_type;
 
        (void)acpi_ns_walk_namespace(type, start_handle, max_depth,
-                                    ACPI_NS_WALK_NO_UNLOCK,
+                                    ACPI_NS_WALK_NO_UNLOCK |
+                                    ACPI_NS_WALK_TEMP_NODES,
                                     acpi_ns_dump_one_object, (void *)&info,
                                     NULL);
 }
@@ -669,7 +680,7 @@ void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth)
 {
        acpi_handle search_handle = search_base;
 
-       ACPI_FUNCTION_TRACE("ns_dump_tables");
+       ACPI_FUNCTION_TRACE(ns_dump_tables);
 
        if (!acpi_gbl_root_node) {
                /*
@@ -682,6 +693,7 @@ void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth)
        }
 
        if (ACPI_NS_ALL == search_base) {
+
                /* Entire namespace */
 
                search_handle = acpi_gbl_root_node;