summaryrefslogtreecommitdiffstats
path: root/tools/power/acpi/os_specific
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-05-28 01:14:55 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-29 01:25:42 +0200
commit2947c1d5f72b77078aeb3df05d4298274234534d (patch)
treec22cdfc06f18da12a96be1a6e598576cfff1e35e /tools/power/acpi/os_specific
parenta238317ce8185519ed083e81e84260907fbbcf7f (diff)
downloadlinux-2947c1d5f72b77078aeb3df05d4298274234534d.tar.gz
linux-2947c1d5f72b77078aeb3df05d4298274234534d.tar.bz2
linux-2947c1d5f72b77078aeb3df05d4298274234534d.zip
ACPICA: acpidump: Fix repetitive table dump in -n mode.
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>
Diffstat (limited to 'tools/power/acpi/os_specific')
-rw-r--r--tools/power/acpi/os_specific/service_layers/oslinuxtbl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
index ba7bad04dff1..28c52008e854 100644
--- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
+++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
@@ -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.