From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
<linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org
Subject: [PATCH 10/14] ACPI 2.0 / ECDT: Enable correct ECDT initialization order
Date: Sat, 6 Feb 2016 11:53:58 +0800 [thread overview]
Message-ID: <2dfd3ba26230a3e9e084e8e2503736c12640b3f1.1454730660.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1454730659.git.lv.zheng@intel.com>
With wrong ECDT fixes reversed, it is able 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.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.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 891c42d..8752860 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -911,11 +911,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
@@ -981,17 +983,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.
@@ -999,6 +994,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
next prev parent reply other threads:[~2016-02-06 3:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-06 3:52 [PATCH 00/14] ACPI 2.0: Enable TermList interpretion and early opeartion region accesses for table loading Lv Zheng
2016-02-06 3:52 ` [PATCH 01/14] ACPI / OSL: Cleanup initrd table override code Lv Zheng
2016-02-06 3:52 ` [PATCH 02/14] ACPI / OSL: Add support to install tables via initrd Lv Zheng
2016-02-06 3:52 ` [PATCH 03/14] ACPI 2.0 / AML: Make default region accessible during the table load Lv Zheng
2016-02-06 3:52 ` [PATCH 04/14] ACPI 2.0 / AML: Tune _REG evaluations order in the initialization steps Lv Zheng
2016-02-06 3:53 ` [PATCH 05/14] ACPI 2.0 / AML: Ensure \_SB._INI executed before any _REG Lv Zheng
2016-02-06 3:53 ` [PATCH 06/14] ACPI 2.0 / AML: Rename acpi_gbl_reg_methods_enabled to acpi_gbl_namespace_initialized Lv Zheng
2016-02-06 3:53 ` [PATCH 07/14] ACPICA: Events: Fix an issue that _REG association can happen before namespace is initialized Lv Zheng
2016-02-06 3:53 ` [PATCH 08/14] ACPI 2.0 / ECDT: Split EC_FLAGS_HANDLERS_INSTALLED Lv Zheng
2016-02-06 3:53 ` [PATCH 09/14] ACPI 2.0 / ECDT: Remove early namespace reference from EC Lv Zheng
2016-02-06 3:53 ` Lv Zheng [this message]
2016-02-06 3:54 ` [PATCH 11/14] ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis Lv Zheng
2016-02-06 3:54 ` [PATCH 12/14] ACPI 2.0 / AML: Add TermList parsing support for table loading Lv Zheng
2016-02-06 3:54 ` [PATCH 13/14] ACPI 2.0 / AML: Enable correct ACPI subsystem initialization order for new table loading mode Lv Zheng
2016-02-06 3:54 ` [PATCH 14/14] ACPI 2.0 / AML: Fix module level execution by correctly parsing table as TermList Lv Zheng
2016-02-19 6:40 ` [PATCH 00/14] ACPI 2.0: Enable TermList interpretion and early opeartion region accesses for table loading Zheng, Lv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2dfd3ba26230a3e9e084e8e2503736c12640b3f1.1454730660.git.lv.zheng@intel.com \
--to=lv.zheng@intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=zetalog@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®