summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/dswstate.c
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2002-08-29 01:51:24 +0000
committeriwasaki <iwasaki@FreeBSD.org>2002-08-29 01:51:24 +0000
commit1824f192010fc0c0826e9889892e534075b58793 (patch)
treebbc04a2733724f3f0ab5cecb259948ac9a9723d7 /sys/contrib/dev/acpica/dswstate.c
parent3f86517f16a9cf970e93e483e90066da6eb323dd (diff)
downloadFreeBSD-src-1824f192010fc0c0826e9889892e534075b58793.zip
FreeBSD-src-1824f192010fc0c0826e9889892e534075b58793.tar.gz
Vendor import of the Intel ACPI CA 20020815 drop.
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