diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 10:20:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 10:20:36 -0700 |
commit | 765426e8ee4c0ab2bc9d44951f4865b8494cdbd0 (patch) | |
tree | 2b46ab8953eff175c8d3474a9754c1ab1394e4de /drivers/acpi/executer/exdump.c | |
parent | 36ec891895020f3bc9953c8b11d079c6d77d76bd (diff) | |
parent | 898b054f3eec5921320ae8614b5bdd7b07ea5b43 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (123 commits)
dock: make dock driver not a module
ACPI: fix ia64 build warning
ACPI: hack around sysfs warning with link order
ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n
intel_menlo: fix build warning
panasonic-laptop: fix build
ACPICA: Update version to 20080926
ACPICA: Add support for zero-length buffer-to-string conversions
ACPICA: New: Validation for predefined ACPI methods/objects
ACPICA: Fix for implicit return compatibility
ACPICA: Fixed a couple memory leaks associated with "implicit return"
ACPICA: Optimize buffer allocation procedure
ACPICA: Fix possible memory leak, error exit path
ACPICA: Fix fault after mem allocation failure in AML parser
ACPICA: Remove unused ACPI register bit definition
ACPICA: Update version to 20080829
ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname
ACPICA: Cleanup for internal Reference Object
ACPICA: Update comments - no functional changes
ACPICA: Update for Reference ACPI_OPERAND_OBJECT
...
Diffstat (limited to 'drivers/acpi/executer/exdump.c')
-rw-r--r-- | drivers/acpi/executer/exdump.c | 87 |
1 files changed, 40 insertions, 47 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 2be2e2bf95b..d087a7d28aa 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c @@ -45,7 +45,6 @@ #include <acpi/acinterp.h> #include <acpi/amlcode.h> #include <acpi/acnamesp.h> -#include <acpi/acparser.h> #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exdump") @@ -214,10 +213,11 @@ static struct acpi_exdump_info acpi_ex_dump_index_field[5] = { {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} }; -static struct acpi_exdump_info acpi_ex_dump_reference[7] = { +static struct acpi_exdump_info acpi_ex_dump_reference[8] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, + {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.class), "Class"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, - {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, + {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, @@ -413,10 +413,10 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, case ACPI_EXD_REFERENCE: - acpi_ex_out_string("Opcode", - (acpi_ps_get_opcode_info - (obj_desc->reference.opcode))-> - name); + acpi_ex_out_string("Class Name", + (char *) + acpi_ut_get_reference_name + (obj_desc)); acpi_ex_dump_reference_obj(obj_desc); break; @@ -494,40 +494,41 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: - switch (obj_desc->reference.opcode) { - case AML_DEBUG_OP: + acpi_os_printf("Reference: [%s] ", + acpi_ut_get_reference_name(obj_desc)); + + switch (obj_desc->reference.class) { + case ACPI_REFCLASS_DEBUG: - acpi_os_printf("Reference: Debug\n"); + acpi_os_printf("\n"); break; - case AML_INDEX_OP: + case ACPI_REFCLASS_INDEX: - acpi_os_printf("Reference: Index %p\n", - obj_desc->reference.object); + acpi_os_printf("%p\n", obj_desc->reference.object); break; - case AML_LOAD_OP: + case ACPI_REFCLASS_TABLE: - acpi_os_printf("Reference: [DdbHandle] TableIndex %p\n", - obj_desc->reference.object); + acpi_os_printf("Table Index %X\n", + obj_desc->reference.value); break; - case AML_REF_OF_OP: + case ACPI_REFCLASS_REFOF: - acpi_os_printf("Reference: (RefOf) %p [%s]\n", - obj_desc->reference.object, + acpi_os_printf("%p [%s]\n", obj_desc->reference.object, acpi_ut_get_type_name(((union acpi_operand_object - *)obj_desc-> + *) + obj_desc-> reference. object)->common. type)); break; - case AML_ARG_OP: + case ACPI_REFCLASS_ARG: - acpi_os_printf("Reference: Arg%d", - obj_desc->reference.offset); + acpi_os_printf("%X", obj_desc->reference.value); if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { @@ -542,10 +543,9 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) acpi_os_printf("\n"); break; - case AML_LOCAL_OP: + case ACPI_REFCLASS_LOCAL: - acpi_os_printf("Reference: Local%d", - obj_desc->reference.offset); + acpi_os_printf("%X", obj_desc->reference.value); if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { @@ -560,21 +560,16 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) acpi_os_printf("\n"); break; - case AML_INT_NAMEPATH_OP: + case ACPI_REFCLASS_NAME: - acpi_os_printf("Reference: Namepath %X [%4.4s]\n", - obj_desc->reference.node->name.integer, + acpi_os_printf("- [%4.4s]\n", obj_desc->reference.node->name.ascii); break; - default: - - /* Unknown opcode */ + default: /* Unknown reference class */ - acpi_os_printf("Unknown Reference opcode=%X\n", - obj_desc->reference.opcode); + acpi_os_printf("%2.2X\n", obj_desc->reference.class); break; - } break; @@ -865,8 +860,8 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; - if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { - acpi_os_printf(" Named Object %p ", obj_desc->reference.node); + if (obj_desc->reference.class == ACPI_REFCLASS_NAME) { + acpi_os_printf(" %p ", obj_desc->reference.node); status = acpi_ns_handle_to_pathname(obj_desc->reference.node, @@ -882,14 +877,12 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) ACPI_DESC_TYPE_OPERAND) { acpi_os_printf(" Target: %p", obj_desc->reference.object); - if (obj_desc->reference.opcode == AML_LOAD_OP) { - /* - * For DDBHandle reference, - * obj_desc->Reference.Object is the table index - */ - acpi_os_printf(" [DDBHandle]\n"); + if (obj_desc->reference.class == ACPI_REFCLASS_TABLE) { + acpi_os_printf(" Table Index: %X\n", + obj_desc->reference.value); } else { - acpi_os_printf(" [%s]\n", + acpi_os_printf(" Target: %p [%s]\n", + obj_desc->reference.object, acpi_ut_get_type_name(((union acpi_operand_object *) @@ -988,9 +981,9 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, case ACPI_TYPE_LOCAL_REFERENCE: - acpi_os_printf("[Object Reference] %s", - (acpi_ps_get_opcode_info - (obj_desc->reference.opcode))->name); + acpi_os_printf("[Object Reference] Type [%s] %2.2X", + acpi_ut_get_reference_name(obj_desc), + obj_desc->reference.class); acpi_ex_dump_reference_obj(obj_desc); break; |