Hi, with commit 7f0c826a437157d2b19662977e9cf3b472cf24a6: ACPICA: Add support for module-level executable AML code
The ACPI interpreter will process executable code outside of methods. But this is not done properly and this commit (this request is about): 8df3fc981dc12d9fdcaef4100a2193b605024d7a ACPICA: Fix Scope() op in module level code fixes it. Related bug: https://bugzilla.kernel.org/show_bug.cgi?id=19462 Beside this bug it got verified that a Panasonic CF-19 which is afftected worked properly with kernel 2.6.27.19. It breaks (different oopses at runtime) in 2.6.32 (possibly earlier). The on top fix that should get submitted makes the machine run smoothly again. If there are no bad reports about this patch and the author(s) agree, it would be great to get it merged into stable kernels. I tried a freshly checked out linux-2.6.32.y kernel and the patch applied without changes, I also verified that the patch was not included in 2.6.36 yet. So it would be great to see it in 2.6.32-36. Thanks, Thomas commit 8df3fc981dc12d9fdcaef4100a2193b605024d7a Author: Bob Moore <[email protected]> Date: Sat Oct 23 01:36:40 2010 -0400 Subject: [PATCH] ACPICA: Fix Scope() op in module level code Some Panasonic Toughbooks create nodes in module level code. Module level code is the executable AML code outside of control method, for example, below AML code creates a node \_SB.PCI0.GFX0.DD02.CUBL If (\_OSI ("Windows 2006")) { Scope (\_SB.PCI0.GFX0.DD02) { Name (CUBL, Ones) ... } } Scope() op does not actually create a new object, it refers to an existing object(\_SB.PCI0.GFX0.DD02 in above example). However, for Scope(), we want to indeed open a new scope, so the child nodes(CUBL in above example) can be created correctly under it. https://bugzilla.kernel.org/show_bug.cgi?id=19462 Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Lin Ming <[email protected]> Signed-off-by: Len Brown <[email protected]> diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c index d555b37..6b0b5d0 100644 --- a/drivers/acpi/acpica/dswexec.c +++ b/drivers/acpi/acpica/dswexec.c @@ -300,10 +300,25 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state, * we must enter this object into the namespace. The created * object is temporary and will be deleted upon completion of * the execution of this method. + * + * Note 10/2010: Except for the Scope() op. This opcode does + * not actually create a new object, it refers to an existing + * object. However, for Scope(), we want to indeed open a + * new scope. */ - status = acpi_ds_load2_begin_op(walk_state, NULL); + if (op->common.aml_opcode != AML_SCOPE_OP) { + status = + acpi_ds_load2_begin_op(walk_state, NULL); + } else { + status = + acpi_ds_scope_stack_push(op->named.node, + op->named.node-> + type, walk_state); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + } } - break; case AML_CLASS_EXECUTE: _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
