diff options
Diffstat (limited to 'source/components/dispatcher/dswload2.c')
-rw-r--r-- | source/components/dispatcher/dswload2.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index 46870830f44b..184f6aa367d2 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -428,6 +428,24 @@ AcpiDsLoad2BeginOp ( } } +#ifdef ACPI_ASL_COMPILER + + /* + * Do not open a scope for AML_EXTERNAL_OP + * AcpiNsLookup 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, + * AcpiNsLookup 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 (WalkState->Opcode == AML_EXTERNAL_OP) + { + Flags |= ACPI_NS_DONT_OPEN_SCOPE; + } +#endif + /* Add new entry or lookup existing entry */ Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType, |