diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2018-06-29 23:48:30 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2018-06-29 23:48:30 +0000 |
commit | da9b0901f63bafb0a5f41d5bfd085776695f4dce (patch) | |
tree | 0951f565e9d3b07cdc637f65c0b11ecf26586536 /sys/contrib/dev/acpica/compiler/aslload.c | |
parent | ab0bcb60321e55632ae6c377becb9410d0fc0731 (diff) | |
parent | d776ccceca14a93812a2f15904c3b09af20ec866 (diff) | |
download | src-da9b0901f63bafb0a5f41d5bfd085776695f4dce.tar.gz src-da9b0901f63bafb0a5f41d5bfd085776695f4dce.zip |
MFV: r335802
Merge ACPICA 20180629.
Notes
Notes:
svn path=/head/; revision=335809
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslload.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslload.c | 79 |
1 files changed, 4 insertions, 75 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslload.c b/sys/contrib/dev/acpica/compiler/aslload.c index 3b982f1a7e0b..e8b0fc405719 100644 --- a/sys/contrib/dev/acpica/compiler/aslload.c +++ b/sys/contrib/dev/acpica/compiler/aslload.c @@ -321,8 +321,7 @@ LdLoadFieldElements ( return (Status); } else if (Status == AE_ALREADY_EXISTS && - (Node->Flags & ANOBJ_IS_EXTERNAL) && - Node->OwnerId != WalkState->OwnerId) + (Node->Flags & ANOBJ_IS_EXTERNAL)) { Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD; } @@ -474,7 +473,6 @@ LdNamespace1Begin ( ACPI_PARSE_OBJECT *Arg; UINT32 i; BOOLEAN ForceNewScope = FALSE; - ACPI_OWNER_ID OwnerId = 0; const ACPI_OPCODE_INFO *OpInfo; ACPI_PARSE_OBJECT *ParentOp; @@ -485,23 +483,6 @@ LdNamespace1Begin ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op %p [%s]\n", Op, Op->Asl.ParseOpName)); - if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK) - { - /* - * Allocate an OwnerId for this block. This helps identify the owners - * of each namespace node. This is used in determining whether if - * certain external declarations cause redefinition errors. - */ - Status = AcpiUtAllocateOwnerId (&OwnerId); - WalkState->OwnerId = OwnerId; - if (ACPI_FAILURE (Status)) - { - AslCoreSubsystemError (Op, Status, - "Failure to allocate owner ID to this definition block.", FALSE); - return_ACPI_STATUS (Status); - } - } - /* * We are only interested in opcodes that have an associated name * (or multiple names) @@ -877,9 +858,7 @@ LdNamespace1Begin ( { /* * Allow one create on an object or segment that was - * previously declared External only if WalkState->OwnerId and - * Node->OwnerId are different (meaning that the current WalkState - * and the Node are in different tables). + * previously declared External */ Node->Flags &= ~ANOBJ_IS_EXTERNAL; Node->Type = (UINT8) ObjectType; @@ -896,18 +875,6 @@ LdNamespace1Begin ( } Status = AE_OK; - - if (Node->OwnerId == WalkState->OwnerId && - !(Node->Flags & IMPLICIT_EXTERNAL)) - { - AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op, - Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op, - Node->Op->Asl.ExternalName); - } - if (Node->Flags & IMPLICIT_EXTERNAL) - { - Node->Flags &= ~IMPLICIT_EXTERNAL; - } } else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) @@ -915,53 +882,15 @@ LdNamespace1Begin ( /* * Allow externals in same scope as the definition of the * actual object. Similar to C. Allows multiple definition - * blocks that refer to each other in the same file. However, - * do not allow name declaration and an external declaration - * within the same table. This is considered a re-declaration. + * blocks that refer to each other in the same file. */ Status = AE_OK; - - if (Node->OwnerId == WalkState->OwnerId) - { - AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op, - Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op, - Node->Op->Asl.ExternalName); - } } else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && (ObjectType == ACPI_TYPE_ANY)) { - /* - * Allow update of externals of unknown type. - * In the case that multiple definition blocks are being - * parsed, updating the OwnerId allows enables subsequent calls - * of this method to understand which table the most recent - * external declaration was seen. Without this OwnerId update, - * code like the following is allowed to compile: - * - * DefinitionBlock("externtest.aml", "DSDT", 0x02, "Intel", "Many", 0x00000001) - * { - * External(ERRS,methodobj) - * Method (MAIN) - * { - * Name(NUM2, 0) - * ERRS(1,2,3) - * } - * } - * - * DefinitionBlock("externtest.aml", "SSDT", 0x02, "Intel", "Many", 0x00000001) - * { - * if (0) - * { - * External(ERRS,methodobj) - * } - * Method (ERRS,3) - * {} - * - * } - */ - Node->OwnerId = WalkState->OwnerId; + /* Allow update of externals of unknown type. */ if (AcpiNsOpensScope (ActualObjectType)) { |