ACPICA: acpidump: Fix repetitive table dump in -n mode.
authorLv Zheng <lv.zheng@intel.com>
Tue, 27 May 2014 17:14:55 +0000 (01:14 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 28 May 2014 23:25:42 +0000 (01:25 +0200)
In "-n" mode, reserved tables (RSDP/RSDT/XSDT/DSDT/FACS) are dumped
multiple times due a missing instance check in osl_get_bios_table().
This patch fixes this issue.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/acpi/os_specific/service_layers/oslinuxtbl.c

index ba7bad04dff13f36bf142920e70b520e19ebca5e..28c52008e854ad8fe8b58372867f654cc5df2ea5 100644 (file)
@@ -783,6 +783,10 @@ osl_get_bios_table(char *signature,
            ACPI_COMPARE_NAME(signature, ACPI_SIG_XSDT) ||
            ACPI_COMPARE_NAME(signature, ACPI_SIG_DSDT) ||
            ACPI_COMPARE_NAME(signature, ACPI_SIG_FACS)) {
+               if (instance > 0) {
+                       return (AE_LIMIT);
+               }
+
                /*
                 * Get the appropriate address, either 32-bit or 64-bit. Be very
                 * careful about the FADT length and validate table addresses.