summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/dswstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/dswstate.c')
-rw-r--r--sys/contrib/dev/acpica/dswstate.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/sys/contrib/dev/acpica/dswstate.c b/sys/contrib/dev/acpica/dswstate.c
index 2b83708..8da290a 100644
--- a/sys/contrib/dev/acpica/dswstate.c
+++ b/sys/contrib/dev/acpica/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 67 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -962,6 +962,8 @@ AcpiDsCreateWalkState (
WalkState->MethodDesc = MthDesc;
WalkState->Thread = Thread;
+ WalkState->ParserState.StartOp = Origin;
+
/* Init the method args/local */
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
@@ -1012,6 +1014,7 @@ AcpiDsInitAmlWalk (
{
ACPI_STATUS Status;
ACPI_PARSE_STATE *ParserState = &WalkState->ParserState;
+ ACPI_PARSE_OBJECT *ExtraOp;
ACPI_FUNCTION_TRACE ("DsInitAmlWalk");
@@ -1059,9 +1062,26 @@ AcpiDsInitAmlWalk (
}
else
{
- /* Setup the current scope */
-
- ParserState->StartNode = ParserState->StartOp->Common.Node;
+ /*
+ * Setup the current scope.
+ * Find a Named Op that has a namespace node associated with it.
+ * search upwards from this Op. Current scope is the first
+ * Op with a namespace node.
+ */
+ ExtraOp = ParserState->StartOp;
+ while (ExtraOp && !ExtraOp->Common.Node)
+ {
+ ExtraOp = ExtraOp->Common.Parent;
+ }
+ if (!ExtraOp)
+ {
+ ParserState->StartNode = NULL;
+ }
+ else
+ {
+ ParserState->StartNode = ExtraOp->Common.Node;
+ }
+
if (ParserState->StartNode)
{
/* Push start scope on scope stack and make it current */
OpenPOWER on IntegriCloud