summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsutils.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2012-10-31 03:27:48 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-15 00:31:28 +0100
commit00eb32550f59a15796e936418b46b5134bd23a55 (patch)
tree8edafb585ff83cefd89dd915529f0956390dd0cc /drivers/acpi/acpica/nsutils.c
parentACPICA: Add ACPI_MOVE_NAME macro to optimize 4-byte ACPI_NAME copies (diff)
downloadlinux-00eb32550f59a15796e936418b46b5134bd23a55.tar.xz
linux-00eb32550f59a15796e936418b46b5134bd23a55.zip
ACPICA: Enhance error reporting for invalid opcodes and bad ACPI_NAMEs
For disassembler, dump the 48 bytes surrounding the invalid opcode. Fix incorrect table offset reported for invalid opcodes. Report original 32-bit value for bad ACPI_NAMEs. 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/nsutils.c')
-rw-r--r--drivers/acpi/acpica/nsutils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index 16b3da80b92d..0d3d481ce58e 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -557,10 +557,11 @@ acpi_ns_externalize_name(u32 internal_name_length,
(*converted_name)[j++] = '.';
}
- (*converted_name)[j++] = internal_name[names_index++];
- (*converted_name)[j++] = internal_name[names_index++];
- (*converted_name)[j++] = internal_name[names_index++];
- (*converted_name)[j++] = internal_name[names_index++];
+ ACPI_MOVE_NAME(*converted_name, internal_name);
+ acpi_ut_repair_name(*converted_name);
+
+ j += ACPI_NAME_SIZE;
+ names_index += ACPI_NAME_SIZE;
}
}