From 93207c1c89bcf8c2291abed617712292c27920f3 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 28 May 2020 21:01:08 +0000 Subject: Import ACPICA 20200528. --- source/compiler/aslxref.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'source/compiler/aslxref.c') diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c index 0df33e3117ffd..4bbbe2bd91eca 100644 --- a/source/compiler/aslxref.c +++ b/source/compiler/aslxref.c @@ -821,9 +821,24 @@ XfNamespaceLocateBegin ( Node->Flags |= ANOBJ_IS_REFERENCED; } - /* Attempt to optimize the NamePath */ - - OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node); + /* + * Attempt to optimize the NamePath + * + * One special case: CondRefOf operator - not all AML interpreter + * implementations expect optimized namepaths as a parameter to this + * operator. They require relative name paths with prefix operators or + * namepaths starting with the root scope. + * + * Other AML interpreter implementations do not perform the namespace + * search that starts at the current scope and recursively searching the + * parent scope until the root scope. The lack of search is only known to + * occur for the namestring parameter for the CondRefOf operator. + */ + if ((Op->Asl.Parent) && + (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF)) + { + OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node); + } /* * 1) Dereference an alias (A name reference that is an alias) -- cgit v1.2.3