Skip to content

Commit

Permalink
ACPI / bus: Adjust ACPI subsystem initialization for new table loadin…
Browse files Browse the repository at this point in the history
…g mode

This patch enables the following initialization order for the
new table loading mode (which is enabled by setting
acpi_gbl_parse_table_as_term_list to TRUE):

  1. Install default region handlers (SystemMemory, SystemIo, PciConfig,
     EmbeddedControl via ECDT) without evaluating _REG;

  2. Load the table and execute the module level AML opcodes instantly.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Sep 26, 2016
1 parent f42106f commit 1ef3566
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,8 @@ void __init acpi_early_init(void)
goto error0;
}

if (acpi_gbl_group_module_level_code) {
if (!acpi_gbl_parse_table_as_term_list &&
acpi_gbl_group_module_level_code) {
status = acpi_load_tables();
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
Expand Down Expand Up @@ -1074,7 +1075,8 @@ static int __init acpi_bus_init(void)
status = acpi_ec_ecdt_probe();
/* Ignore result. Not having an ECDT is not fatal. */

if (!acpi_gbl_group_module_level_code) {
if (acpi_gbl_parse_table_as_term_list ||
!acpi_gbl_group_module_level_code) {
status = acpi_load_tables();
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
Expand Down

0 comments on commit 1ef3566

Please sign in to comment.