Skip to content

Commit

Permalink
ACPI / scan: Enable GPEs before scanning the namespace
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rafaeljw committed Aug 17, 2017
1 parent 1312b7e commit eb7f43c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -2082,9 +2085,6 @@ int __init acpi_scan_init(void)
}
}

acpi_gpe_apply_masked_gpes();
acpi_update_all_gpes();

acpi_scan_initialized = true;

out:
Expand Down

0 comments on commit eb7f43c

Please sign in to comment.