aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/utilities/utglobal.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-09-27 11:08:41 +0800
committerLen Brown <len.brown@intel.com>2008-10-22 23:14:45 -0400
commit1044f1f65b7df2aae979e397904c4985eeb99ba2 (patch)
tree8feb6f2db4f36b75d8c7126d51a7b35e57e13194 /drivers/acpi/utilities/utglobal.c
parent2425a0967f29b196fad5d4f726c9502679284656 (diff)
ACPICA: Cleanup for internal Reference Object
Fix some sloppiness in the Reference object. No longer use AML opcodes to differentiate the types, introduce new reference Class. Cleanup the debug output code. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities/utglobal.c')
-rw-r--r--drivers/acpi/utilities/utglobal.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index bcace577183..0b1e493a837 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -45,7 +45,6 @@
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
-#include <acpi/amlcode.h>
ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
#define _COMPONENT ACPI_UTILITIES
@@ -590,25 +589,31 @@ char *acpi_ut_get_descriptor_name(void *object)
/* Printable names of reference object sub-types */
+static const char *acpi_gbl_ref_class_names[] = {
+ /* 00 */ "Local",
+ /* 01 */ "Argument",
+ /* 02 */ "RefOf",
+ /* 03 */ "Index",
+ /* 04 */ "DdbHandle",
+ /* 05 */ "Named Object",
+ /* 06 */ "Debug"
+};
+
const char *acpi_ut_get_reference_name(union acpi_operand_object *object)
{
+ if (!object)
+ return "NULL Object";
- switch (object->reference.opcode) {
- case AML_INT_NAMEPATH_OP:
- return "Name";
+ if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND)
+ return "Not an Operand object";
- case AML_LOAD_OP:
- return "DDB-Handle";
+ if (object->common.type != ACPI_TYPE_LOCAL_REFERENCE)
+ return "Not a Reference object";
- case AML_REF_OF_OP:
- return "RefOf";
+ if (object->reference.class > ACPI_REFCLASS_MAX)
+ return "Unknown Reference class";
- case AML_INDEX_OP:
- return "Index";
-
- default:
- return "Unknown";
- }
+ return acpi_gbl_ref_class_names[object->reference.class];
}
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
@@ -812,4 +817,4 @@ acpi_status acpi_ut_init_globals(void)
}
ACPI_EXPORT_SYMBOL(acpi_dbg_level)
- ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
+ACPI_EXPORT_SYMBOL(acpi_dbg_layer)