Patch "ACPICA / Interpreter: Fix a regression triggered because of wrong Linux ECDT support ACPICA: Events: Enhance acpi_ev_execute_reg_method() to" has been added to the 4.5-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ACPICA / Interpreter: Fix a regression triggered because of wrong Linux ECDT support
ACPICA: Events: Enhance acpi_ev_execute_reg_method() to
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
acpica-interpreter-fix-a-regression-triggered-because-of-wrong-linux-ecdt-support.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
5508df89756f8378024828e185724a9bd2348985Mon Sep 17 00:00:00 2001
From: Lv Zheng <[email protected]>
Date: Thu, 10 Mar 2016 10:54:29 +0800
Subject: ACPICA / Interpreter: Fix a regression triggered because of wrong Linux ECDT support
From: Lv Zheng <[email protected]>
commit 5508df89756f8378024828e185724a9bd2348985 upstream.
It is reported that the following commit triggers regressions:
Linux commit: efaed9be998b5ae0afb7458e057e5f4402b43fa0 ACPICA commit: 31178590dde82368fdb0f6b0e466b6c0add96c57
Subject: ACPICA: Events: Enhance acpi_ev_execute_reg_method() to
ensure no _REG evaluations can happen during OS early boot stages
This is because that the ECDT support is not corrected in Linux, and Linux requires to execute _REG for ECDT (though this sounds so wrong), we need to ensure acpi_gbl_namespace_initialized is set before ECDT probing in order for _REG to be executed. Since we have to move "acpi_gbl_namespace_initialized = TRUE" to the initialization step happening before ECDT probing, acpi_load_tables() is the best candidate for now. Thus this patch fixes the regression by doing so.
But if the ECDT support is fixed, Linux will not execute _REG for ECDT, and ECDT probing will happen before acpi_load_tables(). At that time, we still want to ensure acpi_gbl_namespace_initialized is set after executing acpi_ns_initialize_objects() (under the condition of acpi_gbl_group_module_level_code = FALSE), this patch also moves acpi_ns_initialize_objects() to acpi_load_tables() accordingly.
Since acpi_ns_initialize_objects() doesn't seem to be skippable, this patch also removes ACPI_NO_OBJECT_INIT for the one invoked in acpi_load_tables(). And since the default region handlers should always be installed before loading the tables, this patch also removes useless acpi_gbl_group_module_level_code check accordingly. Reported by Chris Bainbridge, Fixed by Lv Zheng.
--- drivers/acpi/acpica/nsinit.c | 2 ++ drivers/acpi/acpica/tbxfload.c | 14 ++++++++++++++ drivers/acpi/acpica/utxfinit.c | 25 +++++++++++-------------- 3 files changed, 27 insertions(+), 14 deletions(-)
drivers/acpi/acpica/nsinit.c +2 -0
@@ -83,6 +83,8 @@ acpi_status acpi_ns_initialize_objects(vACPI_FUNCTION_TRACE (ns_initialize_objects); +ACPI_DEBUG_PRINT ((ACPI_DB_EXEC , +"[Init] Completing Initialization of ACPI Objects\n" ));ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH ,"**** Starting initialization of namespace objects ****\n" )); ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
drivers/acpi/acpica/tbxfload.c +14 -0
@@ -83,6 +83,20 @@ acpi_status __init acpi_load_tables(void "While loading namespace from ACPI tables")); } +if (!acpi_gbl_group_module_level_code) { +/* +* 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. +*/ + status =acpi_ns_initialize_objects (); +if (ACPI_FAILURE (status)) { +return_ACPI_STATUS (status); + } + } + + acpi_gbl_reg_methods_enabled = TRUE;return_ACPI_STATUS (status); }
drivers/acpi/acpica/utxfinit.c +11 -14
@@ -267,7 +267,6 @@ acpi_status __init acpi_initialize_objec* initialized, even if they contain executable AML (see the call to * acpi_ns_initialize_objects below). */ - acpi_gbl_reg_methods_enabled = TRUE;if (!(flags &ACPI_NO_ADDRESS_SPACE_INIT )) {ACPI_DEBUG_PRINT ((ACPI_DB_EXEC ,"[Init] Executing _REG OpRegion methods\n" ));
@@ -299,20 +298,18 @@ acpi_status __init acpi_initialize_objec*/ if (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 )) { -ACPI_DEBUG_PRINT ((ACPI_DB_EXEC , -"[Init] Completing Initialization of ACPI Objects\n" )); - - status =acpi_ns_initialize_objects (); -if (ACPI_FAILURE (status)) { -return_ACPI_STATUS (status); +/* +* 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); + } } }
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/acpica-interpreter-fix-a-regression-triggered-because-of-wrong-linux-ecdt-support.patch