summaryrefslogtreecommitdiff
path: root/source/components/dispatcher/dsmethod.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/dispatcher/dsmethod.c')
-rw-r--r--source/components/dispatcher/dsmethod.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c
index 334dadcac664..4c4ff2270127 100644
--- a/source/components/dispatcher/dsmethod.c
+++ b/source/components/dispatcher/dsmethod.c
@@ -107,12 +107,15 @@ AcpiDsAutoSerializeMethod (
"Method auto-serialization parse [%4.4s] %p\n",
AcpiUtGetNodeName (Node), Node));
+ AcpiExEnterInterpreter ();
+
/* Create/Init a root op for the method parse tree */
Op = AcpiPsAllocOp (AML_METHOD_OP, ObjDesc->Method.AmlStart);
if (!Op)
{
- return_ACPI_STATUS (AE_NO_MEMORY);
+ Status = AE_NO_MEMORY;
+ goto Unlock;
}
AcpiPsSetName (Op, Node->Name.Integer);
@@ -124,7 +127,8 @@ AcpiDsAutoSerializeMethod (
if (!WalkState)
{
AcpiPsFreeOp (Op);
- return_ACPI_STATUS (AE_NO_MEMORY);
+ Status = AE_NO_MEMORY;
+ goto Unlock;
}
Status = AcpiDsInitAmlWalk (WalkState, Op, Node,
@@ -143,6 +147,8 @@ AcpiDsAutoSerializeMethod (
Status = AcpiPsParseAml (WalkState);
AcpiPsDeleteParseTree (Op);
+Unlock:
+ AcpiExExitInterpreter ();
return_ACPI_STATUS (Status);
}
@@ -810,7 +816,9 @@ AcpiDsTerminateControlMethod (
{
/* Delete any direct children of (created by) this method */
+ (void) AcpiExExitInterpreter ();
AcpiNsDeleteNamespaceSubtree (WalkState->MethodNode);
+ (void) AcpiExEnterInterpreter ();
/*
* Delete any objects that were created by this method
@@ -821,7 +829,9 @@ AcpiDsTerminateControlMethod (
*/
if (MethodDesc->Method.InfoFlags & ACPI_METHOD_MODIFIED_NAMESPACE)
{
+ (void) AcpiExExitInterpreter ();
AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId);
+ (void) AcpiExEnterInterpreter ();
MethodDesc->Method.InfoFlags &=
~ACPI_METHOD_MODIFIED_NAMESPACE;
}