Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363879
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] ACPI 2.0 / ECDT: Enable correct ECDT initialization order |
| Date | 2016-03-24 03:50 +0100 |
| Message-ID | <rg3vs-4h9-19@gated-at.bofh.it> (permalink) |
| References | <rg3vs-4h9-7@gated-at.bofh.it> <rg3vs-4h9-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
With wrong ECDT fixes reverted, it is possible to put ECDT probing before
acpi_enable_subsystem().
But the ultimate purpose of ECDT re-enabling is to put the ECDT probing
before the namespace initialization (acpi_load_tables()). This patch
achieves this with protections so that we can enable it later when all
necessary corrections are upstreamed.
Link 4: https://bugzilla.kernel.org/show_bug.cgi?id=112911
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Tested-by: Chris Bainbridge <chris.bainbridge@gmail.com>
---
drivers/acpi/bus.c | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 0e85678..2e3ffb1 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -925,11 +925,13 @@ void __init acpi_early_init(void)
goto error0;
}
- status = acpi_load_tables();
- if (ACPI_FAILURE(status)) {
- printk(KERN_ERR PREFIX
- "Unable to load the System Description Tables\n");
- goto error0;
+ if (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 error0;
+ }
}
#ifdef CONFIG_X86
@@ -995,17 +997,10 @@ static int __init acpi_bus_init(void)
acpi_os_initialize1();
- status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
- if (ACPI_FAILURE(status)) {
- printk(KERN_ERR PREFIX
- "Unable to start the ACPI Interpreter\n");
- goto error1;
- }
-
/*
* ACPI 2.0 requires the EC driver to be loaded and work before
- * the EC device is found in the namespace (i.e. before acpi_initialize_objects()
- * is called).
+ * the EC device is found in the namespace (i.e. before
+ * acpi_load_tables() is called).
*
* This is accomplished by looking for the ECDT table, and getting
* the EC parameters out of that.
@@ -1013,6 +1008,22 @@ 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) {
+ 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);
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_ERR PREFIX
+ "Unable to start the ACPI Interpreter\n");
+ goto error1;
+ }
+
status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
--
1.7.10
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] ACPI 2.0 / ECDT: Enable ECDT support Lv Zheng <lv.zheng@intel.com> - 2016-03-24 03:50 +0100 [PATCH 1/4] ACPI 2.0 / ECDT: Split EC_FLAGS_HANDLERS_INSTALLED Lv Zheng <lv.zheng@intel.com> - 2016-03-24 03:50 +0100 [PATCH 2/4] ACPI 2.0 / ECDT: Remove early namespace reference from EC Lv Zheng <lv.zheng@intel.com> - 2016-03-24 03:50 +0100 [PATCH 3/4] ACPI 2.0 / ECDT: Enable correct ECDT initialization order Lv Zheng <lv.zheng@intel.com> - 2016-03-24 03:50 +0100
csiph-web