提交 3f654bad 编写于 作者: B Bob Moore 提交者: Rafael J. Wysocki

ACPICA: Interpreter: Fix Store() when implicit conversion is not possible.

For the cases such as a store of a string to an existing package
object, implement the store as a CopyObject().
This is a small departure from the ACPI specification which states
that the control method should be aborted in this case. However,
ASLTS suite depends on this behavior.
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 9cea6249
......@@ -487,14 +487,33 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
default:
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
"Storing %s (%p) directly into node (%p) with no implicit conversion\n",
"Storing [%s] (%p) directly into node [%s] (%p)"
" with no implicit conversion\n",
acpi_ut_get_object_type_name(source_desc),
source_desc, node));
source_desc,
acpi_ut_get_object_type_name(target_desc),
node));
/* No conversions for all other types. Just attach the source object */
/*
* No conversions for all other types. Directly store a copy of
* the source object. NOTE: This is a departure from the ACPI
* spec, which states "If conversion is impossible, abort the
* running control method".
*
* This code implements "If conversion is impossible, treat the
* Store operation as a CopyObject".
*/
status =
acpi_ut_copy_iobject_to_iobject(source_desc, &new_desc,
walk_state);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
status = acpi_ns_attach_object(node, source_desc,
source_desc->common.type);
status =
acpi_ns_attach_object(node, new_desc,
new_desc->common.type);
acpi_ut_remove_reference(new_desc);
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册