aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utxfinit.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2018-03-14 16:13:09 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-18 19:29:46 +0100
commita406dea82af80a2cb069f7e34e24677fe9dd580e (patch)
treebc9bf2ce34fcb08aaaf2fc374a81d769bfcbf38f /drivers/acpi/acpica/utxfinit.c
parentACPICA: Events: add a return on failure from acpi_hw_register_read (diff)
downloadlinux-dev-a406dea82af80a2cb069f7e34e24677fe9dd580e.tar.xz
linux-dev-a406dea82af80a2cb069f7e34e24677fe9dd580e.zip
ACPICA: Cleanup/simplify module-level code support
This prepares the code for eventual removal of the original style of deferred execution of the MLC. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utxfinit.c')
-rw-r--r--drivers/acpi/acpica/utxfinit.c48
1 files changed, 18 insertions, 30 deletions
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index ed156ac172e7..e3c60f57c9f0 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -211,41 +211,29 @@ acpi_status ACPI_INIT_FUNCTION acpi_initialize_objects(u32 flags)
ACPI_FUNCTION_TRACE(acpi_initialize_objects);
-#ifdef ACPI_EXEC_APP
/*
- * This call implements the "initialization file" option for acpi_exec.
- * This is the precise point that we want to perform the overrides.
+ * This case handles the legacy option that groups all module-level
+ * code blocks together and defers execution until all of the tables
+ * are loaded. Execute all of these blocks at this time.
+ * Execute any module-level code that was detected during the table
+ * load phase.
+ *
+ * Note: this option is deprecated and will be eliminated in the
+ * future. Use of this option can cause problems with AML code that
+ * depends upon in-order immediate execution of module-level code.
*/
- ae_do_object_overrides();
-#endif
+ acpi_ns_exec_module_code_list();
/*
- * Execute any module-level code that was detected during the table load
- * phase. Although illegal since ACPI 2.0, there are many machines that
- * contain this type of code. Each block of detected executable AML code
- * outside of any control method is wrapped with a temporary control
- * method object and placed on a global list. The methods on this list
- * are executed below.
- *
- * This case executes the module-level code for all tables only after
- * all of the tables have been loaded. It is a legacy option and is
- * not compatible with other ACPI implementations. See acpi_ns_load_table.
+ * Initialize the objects that remain uninitialized. This
+ * runs the executable AML that may be part of the
+ * declaration of these objects:
+ * operation_regions, buffer_fields, Buffers, and Packages.
*/
- if (!acpi_gbl_execute_tables_as_methods
- && acpi_gbl_group_module_level_code) {
- acpi_ns_exec_module_code_list();
-
- /*
- * Initialize the objects that remain uninitialized. This
- * runs the executable AML that may be part of the
- * declaration of these objects:
- * operation_regions, buffer_fields, Buffers, and Packages.
- */
- if (!(flags & ACPI_NO_OBJECT_INIT)) {
- status = acpi_ns_initialize_objects();
- if (ACPI_FAILURE(status)) {
- return_ACPI_STATUS(status);
- }
+ if (!(flags & ACPI_NO_OBJECT_INIT)) {
+ status = acpi_ns_initialize_objects();
+ if (ACPI_FAILURE(status)) {
+ return_ACPI_STATUS(status);
}
}