]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPICA: Tables: Fix an issue that FACS initialization is performed twice
authorLv Zheng <lv.zheng@intel.com>
Wed, 1 Jul 2015 06:43:26 +0000 (14:43 +0800)
committerLuis Henriques <luis.henriques@canonical.com>
Wed, 15 Jul 2015 09:01:10 +0000 (10:01 +0100)
commit c04be18448355441a0c424362df65b6422e27bda 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/90f5332a
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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/acpi/acpica/utxfinit.c
include/acpi/actypes.h

index 13380d8184626e174cebba1950d27d0dbaa08274..64f8f307243b79512538d8b102ec3cbfaa9e3b60 100644 (file)
@@ -175,10 +175,12 @@ acpi_status __init acpi_enable_subsystem(u32 flags)
         * Obtain a permanent mapping for the FACS. This is required for the
         * Global Lock and the Firmware Waking Vector
         */
-       status = acpi_tb_initialize_facs();
-       if (ACPI_FAILURE(status)) {
-               ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
-               return_ACPI_STATUS(status);
+       if (!(flags & ACPI_NO_FACS_INIT)) {
+               status = acpi_tb_initialize_facs();
+               if (ACPI_FAILURE(status)) {
+                       ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
+                       return_ACPI_STATUS(status);
+               }
        }
 #endif                         /* !ACPI_REDUCED_HARDWARE */
 
index f0a23d7fd302a2f3218bd9d90effe2dbb35ae47d..00b6e76c8d4c92bfae6f76cd5a28477201d287a5 100644 (file)
@@ -572,6 +572,7 @@ typedef u64 acpi_integer;
 #define ACPI_NO_ACPI_ENABLE             0x10
 #define ACPI_NO_DEVICE_INIT             0x20
 #define ACPI_NO_OBJECT_INIT             0x40
+#define ACPI_NO_FACS_INIT               0x80
 
 /*
  * Initialization state