summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/dswload2.c
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2017-06-05 11:41:49 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-27 23:25:25 +0300
commitbdcf4cdbdc889477cd945d487dbb31fef4977849 (patch)
tree7b041864a22c11c2a8a916c653894e682d79b2b7 /drivers/acpi/acpica/dswload2.c
parent2f8c1141da2f53989e1ace6806ab45a385d24487 (diff)
downloadlinux-bdcf4cdbdc889477cd945d487dbb31fef4977849.tar.xz
ACPICA: Disassembler: add external op to namespace on first pass
ACPICA commit 117be4819588df3b7146f6f01723639b1d61e775 By doing so, external control method resolutions can be resolved like normal control methods. This eliminates the need to reparse the aml all over again for external control methods that were encoded within the aml with the 0x15 bytecode. Link: https://github.com/acpica/acpica/commit/117be481 Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dswload2.c')
-rw-r--r--drivers/acpi/acpica/dswload2.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index ab5d318975f4..aad83ef5a4ec 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -313,8 +313,14 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
#ifdef ACPI_ASL_COMPILER
/*
- * Do not open a scope. This could be an external method
- * and open a scope.
+ * Do not open a scope for AML_EXTERNAL_OP
+ * acpi_ns_lookup can open a new scope based on the object type
+ * of this op. AML_EXTERNAL_OP is a declaration rather than a
+ * definition. In the case that this external is a method object,
+ * acpi_ns_lookup will open a new scope. However, an AML_EXTERNAL_OP
+ * associated with the ACPI_TYPE_METHOD is a declaration, rather than
+ * a definition. Flags is set to avoid opening a scope for any
+ * AML_EXTERNAL_OP.
*/
if (walk_state->opcode == AML_EXTERNAL_OP) {
flags |= ACPI_NS_DONT_OPEN_SCOPE;