]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI / scan: Enable GPEs before scanning the namespace
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Aug 2017 22:34:23 +0000 (00:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Nov 2017 09:09:16 +0000 (10:09 +0100)
commit eb7f43c4adb4a789f99f53916182c3401b4e33c7 upstream.

On some systems the platform firmware expects GPEs to be enabled
before the enumeration of devices and if that expectation is not
met, the systems in question may not boot in some situations.

For this reason, change the initialization ordering of the ACPI
subsystem to make it enable GPEs before scanning the namespace
for the first time in order to enumerate devices.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Lv Zheng <lv.zheng@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/scan.c

index 70fd5502c2843a7cb0338245767a3c7dc2aeb308..b7bdf9d0f5c0b8941b386a4b77c99ebae0956299 100644 (file)
@@ -2058,6 +2058,9 @@ int __init acpi_scan_init(void)
                        acpi_get_spcr_uart_addr();
        }
 
+       acpi_gpe_apply_masked_gpes();
+       acpi_update_all_gpes();
+
        mutex_lock(&acpi_scan_lock);
        /*
         * Enumerate devices in the ACPI namespace.
@@ -2082,9 +2085,6 @@ int __init acpi_scan_init(void)
                }
        }
 
-       acpi_gpe_apply_masked_gpes();
-       acpi_update_all_gpes();
-
        acpi_scan_initialized = true;
 
  out: