Commit c5ba5dae authored by Lv Zheng's avatar Lv Zheng Committed by Jiri Slaby

ACPICA: Tables: Fix an issue that FACS initialization is performed twice

commit c04be184 upstream.

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/90f5332aSigned-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 85a5064b
...@@ -165,10 +165,12 @@ acpi_status acpi_enable_subsystem(u32 flags) ...@@ -165,10 +165,12 @@ acpi_status acpi_enable_subsystem(u32 flags)
* Obtain a permanent mapping for the FACS. This is required for the * Obtain a permanent mapping for the FACS. This is required for the
* Global Lock and the Firmware Waking Vector * Global Lock and the Firmware Waking Vector
*/ */
status = acpi_tb_initialize_facs(); if (!(flags & ACPI_NO_FACS_INIT)) {
if (ACPI_FAILURE(status)) { status = acpi_tb_initialize_facs();
ACPI_WARNING((AE_INFO, "Could not map the FACS table")); if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
return_ACPI_STATUS(status);
}
} }
#endif /* !ACPI_REDUCED_HARDWARE */ #endif /* !ACPI_REDUCED_HARDWARE */
......
...@@ -511,6 +511,7 @@ typedef u64 acpi_integer; ...@@ -511,6 +511,7 @@ typedef u64 acpi_integer;
#define ACPI_NO_ACPI_ENABLE 0x10 #define ACPI_NO_ACPI_ENABLE 0x10
#define ACPI_NO_DEVICE_INIT 0x20 #define ACPI_NO_DEVICE_INIT 0x20
#define ACPI_NO_OBJECT_INIT 0x40 #define ACPI_NO_OBJECT_INIT 0x40
#define ACPI_NO_FACS_INIT 0x80
/* /*
* Initialization state * Initialization state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment