diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-07-23 07:52:24 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-24 00:09:06 +0300 |
commit | 62eb935b77818a5e4ff3c8d9b97036b59944f649 (patch) | |
tree | c8740e201e78916bb24bfe37f34b0398424dbde5 /drivers/acpi/acpica/dsmethod.c | |
parent | 950a429cd21638b0c076d135ed279518b21f452b (diff) | |
download | linux-62eb935b77818a5e4ff3c8d9b97036b59944f649.tar.xz |
ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments
ACPICA commit afb52611dbe7403551f93504d3798534f5c343f4
This patch cleans up the code of assigning the AML address to the
union acpi_operand_object.
The idea behind this cleanup is:
The AML address of the union acpi_operand_object should always be determined at
the point where the object is encountered. It should be started from the
first byte of the object. For example, the opcode of the object, the name
string of the user_term object, or the first byte of the packaged object
(where a pkg_length is prefixed). So it's not cleaner to have it assigned
here and there in the entire ACPICA source tree.
There are some special cases for the internal opcodes, before cleaning up
the internal opcodes, we should also determine the rules for the AML
addresses of the internal opcodes:
1. INT_NAMEPATH_OP: the address of the first byte for the name_string.
2. INT_METHODCALL_OP: the address of the first byte for the name_string.
3. INT_BYTELIST_OP: the address of the first byte for the byte_data list.
4. INT_EVAL_SUBTREE_OP: the address of the first byte for the
Region/Package/Buffer/bank_field/Field arguments.
5. INT_NAMEDFIELD_OP: the address to the name_seg.
6. INT_RESERVEDFIELD_OP: the address to the 0x00 prefix.
7. INT_ACCESSFIELD_OP: the address to the 0x01 prefix.
8. INT_CONNECTION_OP: the address to the 0x02 prefix.
9: INT_EXTACCESSFIELD_OP: the address to the 0x03 prefix.
10.INT_RETURN_VALUE_OP: the address of the replaced operand.
11.computational_data: the address to the
Byte/Word/Dword/Qword/string_prefix.
Before cleaning up the internal root scope of the aml_walk, turning it into
the term_list, we need to remember the aml_start address as the "Aml"
attribute for the union acpi_operand_object created by acpi_ps_create_scope_op().
Finally, we can delete some redundant AML address assignment in psloop.c.
Link: https://github.com/acpica/acpica/commit/afb52611
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dsmethod.c')
-rw-r--r-- | drivers/acpi/acpica/dsmethod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index bf8c16e379fb..4abc2425de4b 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -103,7 +103,7 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node, /* Create/Init a root op for the method parse tree */ - op = acpi_ps_alloc_op(AML_METHOD_OP); + op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start); if (!op) { return_ACPI_STATUS(AE_NO_MEMORY); } |