diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-07-01 02:43:26 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-01 17:17:52 -0400 |
commit | c04be18448355441a0c424362df65b6422e27bda (patch) | |
tree | 4171d07167bb7a8c2e527f58813e1c2fa40fd1f0 | |
parent | f06147f9fbf134c0258bd53aebeb4ed5efea5a25 (diff) |
ACPICA: Tables: Fix an issue that FACS initialization is performed twice
ACPICA commit 90f5332a15e9d9ba83831ca700b2b9f708274658
This patch adds a new FACS initialization flag for acpi_tb_initialize().
acpi_enable_subsystem() might be invoked several times in OS bootup process,
and we don't want FACS initialization to be invoked twice. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/90f5332a
Cc: All applicable <stable@vger.kernel.org> # All applicable
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/utxfinit.c | 10 | ||||
-rw-r--r-- | include/acpi/actypes.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c index 083a76891889..42a32a66ef22 100644 --- a/drivers/acpi/acpica/utxfinit.c +++ b/drivers/acpi/acpica/utxfinit.c | |||
@@ -179,10 +179,12 @@ acpi_status __init acpi_enable_subsystem(u32 flags) | |||
179 | * Obtain a permanent mapping for the FACS. This is required for the | 179 | * Obtain a permanent mapping for the FACS. This is required for the |
180 | * Global Lock and the Firmware Waking Vector | 180 | * Global Lock and the Firmware Waking Vector |
181 | */ | 181 | */ |
182 | status = acpi_tb_initialize_facs(); | 182 | if (!(flags & ACPI_NO_FACS_INIT)) { |
183 | if (ACPI_FAILURE(status)) { | 183 | status = acpi_tb_initialize_facs(); |
184 | ACPI_WARNING((AE_INFO, "Could not map the FACS table")); | 184 | if (ACPI_FAILURE(status)) { |
185 | return_ACPI_STATUS(status); | 185 | ACPI_WARNING((AE_INFO, "Could not map the FACS table")); |
186 | return_ACPI_STATUS(status); | ||
187 | } | ||
186 | } | 188 | } |
187 | #endif /* !ACPI_REDUCED_HARDWARE */ | 189 | #endif /* !ACPI_REDUCED_HARDWARE */ |
188 | 190 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 63fd7f5e9fb3..ff0b53e128ee 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -568,6 +568,7 @@ typedef u64 acpi_integer; | |||
568 | #define ACPI_NO_ACPI_ENABLE 0x10 | 568 | #define ACPI_NO_ACPI_ENABLE 0x10 |
569 | #define ACPI_NO_DEVICE_INIT 0x20 | 569 | #define ACPI_NO_DEVICE_INIT 0x20 |
570 | #define ACPI_NO_OBJECT_INIT 0x40 | 570 | #define ACPI_NO_OBJECT_INIT 0x40 |
571 | #define ACPI_NO_FACS_INIT 0x80 | ||
571 | 572 | ||
572 | /* | 573 | /* |
573 | * Initialization state | 574 | * Initialization state |