提交 d737f333 编写于 作者: E Erik Schmauss 提交者: Rafael J. Wysocki

ACPI: probe ECDT before loading AML tables regardless of module-level code flag

It was discovered that AML tables were loaded before or after the
ECDT depending on acpi_gbl_execute_tables_as_methods. According to
the ACPI spec, the ECDT should be loaded before the namespace is
populated by loading AML tables (DSDT and SSDT). Since the ECDT
should be loaded early in the boot process, this change moves the
ECDT probing to acpi_early_init.
Signed-off-by: NErik Schmauss <erik.schmauss@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 08930d56
...@@ -1054,15 +1054,17 @@ void __init acpi_early_init(void) ...@@ -1054,15 +1054,17 @@ void __init acpi_early_init(void)
goto error0; goto error0;
} }
if (!acpi_gbl_execute_tables_as_methods && /*
acpi_gbl_group_module_level_code) { * ACPI 2.0 requires the EC driver to be loaded and work before
status = acpi_load_tables(); * the EC device is found in the namespace (i.e. before
if (ACPI_FAILURE(status)) { * acpi_load_tables() is called).
printk(KERN_ERR PREFIX *
"Unable to load the System Description Tables\n"); * This is accomplished by looking for the ECDT table, and getting
goto error0; * the EC parameters out of that.
} *
} * Ignore the result. Not having an ECDT is not fatal.
*/
status = acpi_ec_ecdt_probe();
#ifdef CONFIG_X86 #ifdef CONFIG_X86
if (!acpi_ioapic) { if (!acpi_ioapic) {
...@@ -1133,25 +1135,11 @@ static int __init acpi_bus_init(void) ...@@ -1133,25 +1135,11 @@ static int __init acpi_bus_init(void)
acpi_os_initialize1(); acpi_os_initialize1();
/* status = acpi_load_tables();
* ACPI 2.0 requires the EC driver to be loaded and work before if (ACPI_FAILURE(status)) {
* the EC device is found in the namespace (i.e. before printk(KERN_ERR PREFIX
* acpi_load_tables() is called). "Unable to load the System Description Tables\n");
* goto error1;
* This is accomplished by looking for the ECDT table, and getting
* the EC parameters out of that.
*/
status = acpi_ec_ecdt_probe();
/* Ignore result. Not having an ECDT is not fatal. */
if (acpi_gbl_execute_tables_as_methods ||
!acpi_gbl_group_module_level_code) {
status = acpi_load_tables();
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
"Unable to load the System Description Tables\n");
goto error1;
}
} }
status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE); status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册