aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utglobal.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-09-26 23:08:41 -0400
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 bcace577183b..0b1e493a8374 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -45,7 +45,6 @@
45 45
46#include <acpi/acpi.h> 46#include <acpi/acpi.h>
47#include <acpi/acnamesp.h> 47#include <acpi/acnamesp.h>
48#include <acpi/amlcode.h>
49 48
50ACPI_EXPORT_SYMBOL(acpi_gbl_FADT) 49ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
51#define _COMPONENT ACPI_UTILITIES 50#define _COMPONENT ACPI_UTILITIES
@@ -590,25 +589,31 @@ char *acpi_ut_get_descriptor_name(void *object)
590 589
591/* Printable names of reference object sub-types */ 590/* Printable names of reference object sub-types */
592 591
592static const char *acpi_gbl_ref_class_names[] = {
593 /* 00 */ "Local",
594 /* 01 */ "Argument",
595 /* 02 */ "RefOf",
596 /* 03 */ "Index",
597 /* 04 */ "DdbHandle",
598 /* 05 */ "Named Object",
599 /* 06 */ "Debug"
600};
601
593const char *acpi_ut_get_reference_name(union acpi_operand_object *object) 602const char *acpi_ut_get_reference_name(union acpi_operand_object *object)
594{ 603{
604 if (!object)
605 return "NULL Object";
595 606
596 switch (object->reference.opcode) { 607 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND)
597 case AML_INT_NAMEPATH_OP: 608 return "Not an Operand object";
598 return "Name";
599 609
600 case AML_LOAD_OP: 610 if (object->common.type != ACPI_TYPE_LOCAL_REFERENCE)
601 return "DDB-Handle"; 611 return "Not a Reference object";
602 612
603 case AML_REF_OF_OP: 613 if (object->reference.class > ACPI_REFCLASS_MAX)
604 return "RefOf"; 614 return "Unknown Reference class";
605 615
606 case AML_INDEX_OP: 616 return acpi_gbl_ref_class_names[object->reference.class];
607 return "Index";
608
609 default:
610 return "Unknown";
611 }
612} 617}
613 618
614#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 619#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
@@ -812,4 +817,4 @@ acpi_status acpi_ut_init_globals(void)
812} 817}
813 818
814ACPI_EXPORT_SYMBOL(acpi_dbg_level) 819ACPI_EXPORT_SYMBOL(acpi_dbg_level)
815 ACPI_EXPORT_SYMBOL(acpi_dbg_layer) 820ACPI_EXPORT_SYMBOL(acpi_dbg_layer)