summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/psobject.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-07-23 12:52:24 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-23 23:09:06 +0200
commit62eb935b77818a5e4ff3c8d9b97036b59944f649 (patch)
treec8740e201e78916bb24bfe37f34b0398424dbde5 /drivers/acpi/acpica/psobject.c
parent950a429cd21638b0c076d135ed279518b21f452b (diff)
downloadop-kernel-dev-62eb935b77818a5e4ff3c8d9b97036b59944f649.zip
op-kernel-dev-62eb935b77818a5e4ff3c8d9b97036b59944f649.tar.gz
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/psobject.c')
-rw-r--r--drivers/acpi/acpica/psobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index 6ba3bb7..e54bc2a 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -297,7 +297,7 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state,
/* Create Op structure and append to parent's argument list */
walk_state->op_info = acpi_ps_get_opcode_info(walk_state->opcode);
- op = acpi_ps_alloc_op(walk_state->opcode);
+ op = acpi_ps_alloc_op(walk_state->opcode, aml_op_start);
if (!op) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
OpenPOWER on IntegriCloud