diff options
author | Bob Moore <robert.moore@intel.com> | 2015-07-01 09:44:44 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-02 00:17:55 +0300 |
commit | fde175e385fc28c31a50be2608113689449a4b75 (patch) | |
tree | f4ad3465040dc706b2460e55473919e2bc960e08 /drivers/acpi/acpica/exdebug.c | |
parent | dc00203b6c6fb1b0ce99f37118d9a3e7a6807d7b (diff) | |
download | linux-fde175e385fc28c31a50be2608113689449a4b75.tar.xz |
ACPICA: Cleanup output for the ASL Debug object
ACPICA commit d4a53a396fe5d384425251b0257f8d125bbed617
Especially for use of the Index operator. For buffers and strings,
only output the actual byte pointed to by the index. For packages,
only print the package element decoded by the index.
Link: https://github.com/acpica/acpica/commit/d4a53a39
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/exdebug.c')
-rw-r--r-- | drivers/acpi/acpica/exdebug.c | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/exdebug.c b/drivers/acpi/acpica/exdebug.c index e67d0aca3fe6..815442bbd051 100644 --- a/drivers/acpi/acpica/exdebug.c +++ b/drivers/acpi/acpica/exdebug.c @@ -76,6 +76,8 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, { u32 i; u32 timer; + union acpi_operand_object *object_desc; + u32 value; ACPI_FUNCTION_TRACE_PTR(ex_do_debug_object, source_desc); @@ -254,8 +256,44 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, object)->object, level + 4, 0); } else { - acpi_ex_do_debug_object(source_desc->reference. - object, level + 4, 0); + object_desc = source_desc->reference.object; + value = source_desc->reference.value; + + switch (object_desc->common.type) { + case ACPI_TYPE_BUFFER: + + acpi_os_printf("Buffer[%u] = 0x%2.2X\n", + value, + *source_desc->reference. + index_pointer); + break; + + case ACPI_TYPE_STRING: + + acpi_os_printf + ("String[%u] = \"%c\" (0x%2.2X)\n", + value, + *source_desc->reference. + index_pointer, + *source_desc->reference. + index_pointer); + break; + + case ACPI_TYPE_PACKAGE: + + acpi_os_printf("Package[%u] = ", value); + acpi_ex_do_debug_object(*source_desc-> + reference.where, + level + 4, 0); + break; + + default: + + acpi_os_printf + ("Unknown Reference object type %X\n", + object_desc->common.type); + break; + } } } break; |