Skip to content

Commit c04be18

Browse files
Lv Zhengrafaeljw
authored andcommitted
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: acpica/acpica@90f5332a Cc: All applicable <[email protected]> # All applicable Signed-off-by: Lv Zheng <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f06147f commit c04be18

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/acpi/acpica/utxfinit.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,12 @@ acpi_status __init acpi_enable_subsystem(u32 flags)
179179
* Obtain a permanent mapping for the FACS. This is required for the
180180
* Global Lock and the Firmware Waking Vector
181181
*/
182-
status = acpi_tb_initialize_facs();
183-
if (ACPI_FAILURE(status)) {
184-
ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
185-
return_ACPI_STATUS(status);
182+
if (!(flags & ACPI_NO_FACS_INIT)) {
183+
status = acpi_tb_initialize_facs();
184+
if (ACPI_FAILURE(status)) {
185+
ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
186+
return_ACPI_STATUS(status);
187+
}
186188
}
187189
#endif /* !ACPI_REDUCED_HARDWARE */
188190

include/acpi/actypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ typedef u64 acpi_integer;
568568
#define ACPI_NO_ACPI_ENABLE 0x10
569569
#define ACPI_NO_DEVICE_INIT 0x20
570570
#define ACPI_NO_OBJECT_INIT 0x40
571+
#define ACPI_NO_FACS_INIT 0x80
571572

572573
/*
573574
* Initialization state

0 commit comments

Comments
 (0)