提交 e5bcc811 编写于 作者: L Lin Ming 提交者: Len Brown

ACPICA: Fixed a problem with Index references passed as method arguments

References passed as arguments to control methods were dereferenced
immediately (before control was passed to the called method). The
references are now correctly passed directly to the called
method.

http://bugzilla.kernel.org/show_bug.cgi?id=5389Signed-off-by: NLin Ming <ming.m.lin@intel.com>
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 1f549a24
...@@ -194,6 +194,12 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, ...@@ -194,6 +194,12 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
case ACPI_TYPE_PACKAGE: case ACPI_TYPE_PACKAGE:
/* If method call - leave the Reference on the stack */
if (walk_state->opcode == AML_INT_METHODCALL_OP) {
break;
}
obj_desc = *stack_desc->reference.where; obj_desc = *stack_desc->reference.where;
if (obj_desc) { if (obj_desc) {
/* /*
...@@ -210,7 +216,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, ...@@ -210,7 +216,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
* the package, can't dereference it * the package, can't dereference it
*/ */
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Attempt to deref an Index to NULL pkg element Idx=%p", "Attempt to dereference an Index to NULL package element Idx=%p",
stack_desc)); stack_desc));
status = AE_AML_UNINITIALIZED_ELEMENT; status = AE_AML_UNINITIALIZED_ELEMENT;
} }
...@@ -221,7 +227,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, ...@@ -221,7 +227,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
/* Invalid reference object */ /* Invalid reference object */
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Unknown TargetType %X in Index/Reference obj %p", "Unknown TargetType %X in Index/Reference object %p",
stack_desc->reference.target_type, stack_desc->reference.target_type,
stack_desc)); stack_desc));
status = AE_AML_INTERNAL; status = AE_AML_INTERNAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册