summaryrefslogtreecommitdiff
path: root/source/compiler/aslload.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslload.c')
-rw-r--r--source/compiler/aslload.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c
index bd564b33682e..2c825f0fd3c7 100644
--- a/source/compiler/aslload.c
+++ b/source/compiler/aslload.c
@@ -316,7 +316,8 @@ LdLoadFieldElements (
return (Status);
}
else if (Status == AE_ALREADY_EXISTS &&
- (Node->Flags & ANOBJ_IS_EXTERNAL))
+ (Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ Node->OwnerId != WalkState->OwnerId)
{
Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD;
}
@@ -564,7 +565,7 @@ LdNamespace1Begin (
* a new scope so that the resource subfield names can be entered into
* the namespace underneath this name
*/
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
ForceNewScope = TRUE;
}
@@ -614,7 +615,7 @@ LdNamespace1Begin (
case PARSEOP_DEFAULT_ARG:
- if (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC)
{
Status = LdLoadResourceElements (Op, WalkState);
return_ACPI_STATUS (Status);
@@ -823,11 +824,16 @@ LdNamespace1Begin (
Status = AE_OK;
- if (Node->OwnerId == WalkState->OwnerId)
+ if (Node->OwnerId == WalkState->OwnerId &&
+ !(Node->Flags & IMPLICIT_EXTERNAL))
{
AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Op,
Op->Asl.ExternalName);
}
+ if (Node->Flags & IMPLICIT_EXTERNAL)
+ {
+ Node->Flags &= ~IMPLICIT_EXTERNAL;
+ }
}
else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
@@ -1000,7 +1006,7 @@ LdNamespace2Begin (
/* Get the type to determine if we should push the scope */
if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) &&
- (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC))
+ (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC))
{
ObjectType = ACPI_TYPE_LOCAL_RESOURCE;
}
@@ -1013,7 +1019,7 @@ LdNamespace2Begin (
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
{
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
ForceNewScope = TRUE;
}
@@ -1124,7 +1130,7 @@ LdCommonNamespaceEnd (
/* Get the type to determine if we should pop the scope */
if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) &&
- (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC))
+ (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC))
{
/* TBD: Merge into AcpiDsMapNamedOpcodeToDataType */
@@ -1139,7 +1145,7 @@ LdCommonNamespaceEnd (
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
{
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
ForceNewScope = TRUE;
}