1 /******************************************************************************
3 * Module Name: dsmethod - Parser/Interpreter interface - control method parsing
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2014, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
44 #define __DSMETHOD_C__
56 #define _COMPONENT ACPI_DISPATCHER
57 ACPI_MODULE_NAME ("dsmethod")
59 /* Local prototypes */
62 AcpiDsDetectNamedOpcodes (
63 ACPI_WALK_STATE *WalkState,
64 ACPI_PARSE_OBJECT **OutOp);
67 AcpiDsCreateMethodMutex (
68 ACPI_OPERAND_OBJECT *MethodDesc);
71 /*******************************************************************************
73 * FUNCTION: AcpiDsAutoSerializeMethod
75 * PARAMETERS: Node - Namespace Node of the method
76 * ObjDesc - Method object attached to node
80 * DESCRIPTION: Parse a control method AML to scan for control methods that
81 * need serialization due to the creation of named objects.
83 * NOTE: It is a bit of overkill to mark all such methods serialized, since
84 * there is only a problem if the method actually blocks during execution.
85 * A blocking operation is, for example, a Sleep() operation, or any access
86 * to an operation region. However, it is probably not possible to easily
87 * detect whether a method will block or not, so we simply mark all suspicious
88 * methods as serialized.
90 * NOTE2: This code is essentially a generic routine for parsing a single
93 ******************************************************************************/
96 AcpiDsAutoSerializeMethod (
97 ACPI_NAMESPACE_NODE *Node,
98 ACPI_OPERAND_OBJECT *ObjDesc)
101 ACPI_PARSE_OBJECT *Op = NULL;
102 ACPI_WALK_STATE *WalkState;
105 ACPI_FUNCTION_TRACE_PTR (DsAutoSerializeMethod, Node);
108 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
109 "Method auto-serialization parse [%4.4s] %p\n",
110 AcpiUtGetNodeName (Node), Node));
112 /* Create/Init a root op for the method parse tree */
114 Op = AcpiPsAllocOp (AML_METHOD_OP);
117 return_ACPI_STATUS (AE_NO_MEMORY);
120 AcpiPsSetName (Op, Node->Name.Integer);
121 Op->Common.Node = Node;
123 /* Create and initialize a new walk state */
125 WalkState = AcpiDsCreateWalkState (Node->OwnerId, NULL, NULL, NULL);
128 return_ACPI_STATUS (AE_NO_MEMORY);
131 Status = AcpiDsInitAmlWalk (WalkState, Op, Node, ObjDesc->Method.AmlStart,
132 ObjDesc->Method.AmlLength, NULL, 0);
133 if (ACPI_FAILURE (Status))
135 AcpiDsDeleteWalkState (WalkState);
136 return_ACPI_STATUS (Status);
139 WalkState->DescendingCallback = AcpiDsDetectNamedOpcodes;
141 /* Parse the method, scan for creation of named objects */
143 Status = AcpiPsParseAml (WalkState);
144 if (ACPI_FAILURE (Status))
146 return_ACPI_STATUS (Status);
149 AcpiPsDeleteParseTree (Op);
150 return_ACPI_STATUS (Status);
154 /*******************************************************************************
156 * FUNCTION: AcpiDsDetectNamedOpcodes
158 * PARAMETERS: WalkState - Current state of the parse tree walk
159 * OutOp - Unused, required for parser interface
163 * DESCRIPTION: Descending callback used during the loading of ACPI tables.
164 * Currently used to detect methods that must be marked serialized
165 * in order to avoid problems with the creation of named objects.
167 ******************************************************************************/
170 AcpiDsDetectNamedOpcodes (
171 ACPI_WALK_STATE *WalkState,
172 ACPI_PARSE_OBJECT **OutOp)
175 ACPI_FUNCTION_NAME (AcpiDsDetectNamedOpcodes);
178 /* We are only interested in opcodes that create a new name */
180 if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_CREATE | AML_FIELD)))
186 * At this point, we know we have a Named object opcode.
187 * Mark the method as serialized. Later code will create a mutex for
188 * this method to enforce serialization.
190 WalkState->MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED;
192 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
193 "Method serialized [%4.4s] %p - [%s] (%4.4X)\n",
194 WalkState->MethodNode->Name.Ascii, WalkState->MethodNode,
195 WalkState->OpInfo->Name, WalkState->Opcode));
197 /* Abort the parse, no need to examine this method any further */
199 return (AE_CTRL_TERMINATE);
203 /*******************************************************************************
205 * FUNCTION: AcpiDsMethodError
207 * PARAMETERS: Status - Execution status
208 * WalkState - Current state
212 * DESCRIPTION: Called on method error. Invoke the global exception handler if
213 * present, dump the method data if the disassembler is configured
215 * Note: Allows the exception handler to change the status code
217 ******************************************************************************/
222 ACPI_WALK_STATE *WalkState)
224 ACPI_FUNCTION_ENTRY ();
227 /* Ignore AE_OK and control exception codes */
229 if (ACPI_SUCCESS (Status) ||
230 (Status & AE_CODE_CONTROL))
235 /* Invoke the global exception handler */
237 if (AcpiGbl_ExceptionHandler)
239 /* Exit the interpreter, allow handler to execute methods */
241 AcpiExExitInterpreter ();
244 * Handler can map the exception code to anything it wants, including
245 * AE_OK, in which case the executing method will not be aborted.
247 Status = AcpiGbl_ExceptionHandler (Status,
248 WalkState->MethodNode ?
249 WalkState->MethodNode->Name.Integer : 0,
250 WalkState->Opcode, WalkState->AmlOffset, NULL);
251 AcpiExEnterInterpreter ();
254 AcpiDsClearImplicitReturn (WalkState);
256 #ifdef ACPI_DISASSEMBLER
257 if (ACPI_FAILURE (Status))
259 /* Display method locals/args if disassembler is present */
261 AcpiDmDumpMethodInfo (Status, WalkState, WalkState->Op);
269 /*******************************************************************************
271 * FUNCTION: AcpiDsCreateMethodMutex
273 * PARAMETERS: ObjDesc - The method object
277 * DESCRIPTION: Create a mutex object for a serialized control method
279 ******************************************************************************/
282 AcpiDsCreateMethodMutex (
283 ACPI_OPERAND_OBJECT *MethodDesc)
285 ACPI_OPERAND_OBJECT *MutexDesc;
289 ACPI_FUNCTION_TRACE (DsCreateMethodMutex);
292 /* Create the new mutex object */
294 MutexDesc = AcpiUtCreateInternalObject (ACPI_TYPE_MUTEX);
297 return_ACPI_STATUS (AE_NO_MEMORY);
300 /* Create the actual OS Mutex */
302 Status = AcpiOsCreateMutex (&MutexDesc->Mutex.OsMutex);
303 if (ACPI_FAILURE (Status))
305 AcpiUtDeleteObjectDesc (MutexDesc);
306 return_ACPI_STATUS (Status);
309 MutexDesc->Mutex.SyncLevel = MethodDesc->Method.SyncLevel;
310 MethodDesc->Method.Mutex = MutexDesc;
311 return_ACPI_STATUS (AE_OK);
315 /*******************************************************************************
317 * FUNCTION: AcpiDsBeginMethodExecution
319 * PARAMETERS: MethodNode - Node of the method
320 * ObjDesc - The method object
321 * WalkState - current state, NULL if not yet executing
326 * DESCRIPTION: Prepare a method for execution. Parses the method if necessary,
327 * increments the thread count, and waits at the method semaphore
328 * for clearance to execute.
330 ******************************************************************************/
333 AcpiDsBeginMethodExecution (
334 ACPI_NAMESPACE_NODE *MethodNode,
335 ACPI_OPERAND_OBJECT *ObjDesc,
336 ACPI_WALK_STATE *WalkState)
338 ACPI_STATUS Status = AE_OK;
341 ACPI_FUNCTION_TRACE_PTR (DsBeginMethodExecution, MethodNode);
346 return_ACPI_STATUS (AE_NULL_ENTRY);
349 /* Prevent wraparound of thread count */
351 if (ObjDesc->Method.ThreadCount == ACPI_UINT8_MAX)
353 ACPI_ERROR ((AE_INFO,
354 "Method reached maximum reentrancy limit (255)"));
355 return_ACPI_STATUS (AE_AML_METHOD_LIMIT);
359 * If this method is serialized, we need to acquire the method mutex.
361 if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED)
364 * Create a mutex for the method if it is defined to be Serialized
365 * and a mutex has not already been created. We defer the mutex creation
366 * until a method is actually executed, to minimize the object count
368 if (!ObjDesc->Method.Mutex)
370 Status = AcpiDsCreateMethodMutex (ObjDesc);
371 if (ACPI_FAILURE (Status))
373 return_ACPI_STATUS (Status);
378 * The CurrentSyncLevel (per-thread) must be less than or equal to
379 * the sync level of the method. This mechanism provides some
380 * deadlock prevention
382 * Top-level method invocation has no walk state at this point
385 (WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel))
387 ACPI_ERROR ((AE_INFO,
388 "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%u)",
389 AcpiUtGetNodeName (MethodNode),
390 WalkState->Thread->CurrentSyncLevel));
392 return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
396 * Obtain the method mutex if necessary. Do not acquire mutex for a
400 !ObjDesc->Method.Mutex->Mutex.ThreadId ||
401 (WalkState->Thread->ThreadId != ObjDesc->Method.Mutex->Mutex.ThreadId))
404 * Acquire the method mutex. This releases the interpreter if we
405 * block (and reacquires it before it returns)
407 Status = AcpiExSystemWaitMutex (ObjDesc->Method.Mutex->Mutex.OsMutex,
409 if (ACPI_FAILURE (Status))
411 return_ACPI_STATUS (Status);
414 /* Update the mutex and walk info and save the original SyncLevel */
418 ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
419 WalkState->Thread->CurrentSyncLevel;
421 ObjDesc->Method.Mutex->Mutex.ThreadId = WalkState->Thread->ThreadId;
422 WalkState->Thread->CurrentSyncLevel = ObjDesc->Method.SyncLevel;
426 ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
427 ObjDesc->Method.Mutex->Mutex.SyncLevel;
431 /* Always increase acquisition depth */
433 ObjDesc->Method.Mutex->Mutex.AcquisitionDepth++;
437 * Allocate an Owner ID for this method, only if this is the first thread
438 * to begin concurrent execution. We only need one OwnerId, even if the
439 * method is invoked recursively.
441 if (!ObjDesc->Method.OwnerId)
443 Status = AcpiUtAllocateOwnerId (&ObjDesc->Method.OwnerId);
444 if (ACPI_FAILURE (Status))
451 * Increment the method parse tree thread count since it has been
452 * reentered one more time (even if it is the same thread)
454 ObjDesc->Method.ThreadCount++;
456 return_ACPI_STATUS (Status);
460 /* On error, must release the method mutex (if present) */
462 if (ObjDesc->Method.Mutex)
464 AcpiOsReleaseMutex (ObjDesc->Method.Mutex->Mutex.OsMutex);
466 return_ACPI_STATUS (Status);
470 /*******************************************************************************
472 * FUNCTION: AcpiDsCallControlMethod
474 * PARAMETERS: Thread - Info for this thread
475 * ThisWalkState - Current walk state
476 * Op - Current Op to be walked
480 * DESCRIPTION: Transfer execution to a called control method
482 ******************************************************************************/
485 AcpiDsCallControlMethod (
486 ACPI_THREAD_STATE *Thread,
487 ACPI_WALK_STATE *ThisWalkState,
488 ACPI_PARSE_OBJECT *Op)
491 ACPI_NAMESPACE_NODE *MethodNode;
492 ACPI_WALK_STATE *NextWalkState = NULL;
493 ACPI_OPERAND_OBJECT *ObjDesc;
494 ACPI_EVALUATE_INFO *Info;
498 ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState);
500 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Calling method %p, currentstate=%p\n",
501 ThisWalkState->PrevOp, ThisWalkState));
504 * Get the namespace entry for the control method we are about to call
506 MethodNode = ThisWalkState->MethodCallNode;
509 return_ACPI_STATUS (AE_NULL_ENTRY);
512 ObjDesc = AcpiNsGetAttachedObject (MethodNode);
515 return_ACPI_STATUS (AE_NULL_OBJECT);
518 /* Init for new method, possibly wait on method mutex */
520 Status = AcpiDsBeginMethodExecution (MethodNode, ObjDesc,
522 if (ACPI_FAILURE (Status))
524 return_ACPI_STATUS (Status);
527 /* Begin method parse/execution. Create a new walk state */
529 NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwnerId,
530 NULL, ObjDesc, Thread);
533 Status = AE_NO_MEMORY;
538 * The resolved arguments were put on the previous walk state's operand
539 * stack. Operands on the previous walk state stack always
540 * start at index 0. Also, null terminate the list of arguments
542 ThisWalkState->Operands [ThisWalkState->NumOperands] = NULL;
545 * Allocate and initialize the evaluation information block
546 * TBD: this is somewhat inefficient, should change interface to
547 * DsInitAmlWalk. For now, keeps this struct off the CPU stack
549 Info = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
552 Status = AE_NO_MEMORY;
556 Info->Parameters = &ThisWalkState->Operands[0];
558 Status = AcpiDsInitAmlWalk (NextWalkState, NULL, MethodNode,
559 ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
560 Info, ACPI_IMODE_EXECUTE);
563 if (ACPI_FAILURE (Status))
569 * Delete the operands on the previous walkstate operand stack
570 * (they were copied to new objects)
572 for (i = 0; i < ObjDesc->Method.ParamCount; i++)
574 AcpiUtRemoveReference (ThisWalkState->Operands [i]);
575 ThisWalkState->Operands [i] = NULL;
578 /* Clear the operand stack */
580 ThisWalkState->NumOperands = 0;
582 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
583 "**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
584 MethodNode->Name.Ascii, NextWalkState));
586 /* Invoke an internal method if necessary */
588 if (ObjDesc->Method.InfoFlags & ACPI_METHOD_INTERNAL_ONLY)
590 Status = ObjDesc->Method.Dispatch.Implementation (NextWalkState);
593 Status = AE_CTRL_TERMINATE;
597 return_ACPI_STATUS (Status);
602 /* On error, we must terminate the method properly */
604 AcpiDsTerminateControlMethod (ObjDesc, NextWalkState);
607 AcpiDsDeleteWalkState (NextWalkState);
610 return_ACPI_STATUS (Status);
614 /*******************************************************************************
616 * FUNCTION: AcpiDsRestartControlMethod
618 * PARAMETERS: WalkState - State for preempted method (caller)
619 * ReturnDesc - Return value from the called method
623 * DESCRIPTION: Restart a method that was preempted by another (nested) method
624 * invocation. Handle the return value (if any) from the callee.
626 ******************************************************************************/
629 AcpiDsRestartControlMethod (
630 ACPI_WALK_STATE *WalkState,
631 ACPI_OPERAND_OBJECT *ReturnDesc)
634 int SameAsImplicitReturn;
637 ACPI_FUNCTION_TRACE_PTR (DsRestartControlMethod, WalkState);
640 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
641 "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
642 AcpiUtGetNodeName (WalkState->MethodNode),
643 WalkState->MethodCallOp, ReturnDesc));
645 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
646 " ReturnFromThisMethodUsed?=%X ResStack %p Walk %p\n",
647 WalkState->ReturnUsed,
648 WalkState->Results, WalkState));
650 /* Did the called method return a value? */
654 /* Is the implicit return object the same as the return desc? */
656 SameAsImplicitReturn = (WalkState->ImplicitReturnObj == ReturnDesc);
658 /* Are we actually going to use the return value? */
660 if (WalkState->ReturnUsed)
662 /* Save the return value from the previous method */
664 Status = AcpiDsResultPush (ReturnDesc, WalkState);
665 if (ACPI_FAILURE (Status))
667 AcpiUtRemoveReference (ReturnDesc);
668 return_ACPI_STATUS (Status);
672 * Save as THIS method's return value in case it is returned
673 * immediately to yet another method
675 WalkState->ReturnDesc = ReturnDesc;
679 * The following code is the optional support for the so-called
680 * "implicit return". Some AML code assumes that the last value of the
681 * method is "implicitly" returned to the caller, in the absence of an
682 * explicit return value.
684 * Just save the last result of the method as the return value.
686 * NOTE: this is optional because the ASL language does not actually
687 * support this behavior.
689 else if (!AcpiDsDoImplicitReturn (ReturnDesc, WalkState, FALSE) ||
690 SameAsImplicitReturn)
693 * Delete the return value if it will not be used by the
694 * calling method or remove one reference if the explicit return
695 * is the same as the implicit return value.
697 AcpiUtRemoveReference (ReturnDesc);
701 return_ACPI_STATUS (AE_OK);
705 /*******************************************************************************
707 * FUNCTION: AcpiDsTerminateControlMethod
709 * PARAMETERS: MethodDesc - Method object
710 * WalkState - State associated with the method
714 * DESCRIPTION: Terminate a control method. Delete everything that the method
715 * created, delete all locals and arguments, and delete the parse
718 * MUTEX: Interpreter is locked
720 ******************************************************************************/
723 AcpiDsTerminateControlMethod (
724 ACPI_OPERAND_OBJECT *MethodDesc,
725 ACPI_WALK_STATE *WalkState)
728 ACPI_FUNCTION_TRACE_PTR (DsTerminateControlMethod, WalkState);
731 /* MethodDesc is required, WalkState is optional */
740 /* Delete all arguments and locals */
742 AcpiDsMethodDataDeleteAll (WalkState);
745 * If method is serialized, release the mutex and restore the
746 * current sync level for this thread
748 if (MethodDesc->Method.Mutex)
750 /* Acquisition Depth handles recursive calls */
752 MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--;
753 if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth)
755 WalkState->Thread->CurrentSyncLevel =
756 MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel;
758 AcpiOsReleaseMutex (MethodDesc->Method.Mutex->Mutex.OsMutex);
759 MethodDesc->Method.Mutex->Mutex.ThreadId = 0;
764 * Delete any namespace objects created anywhere within the
765 * namespace by the execution of this method. Unless:
766 * 1) This method is a module-level executable code method, in which
767 * case we want make the objects permanent.
768 * 2) There are other threads executing the method, in which case we
769 * will wait until the last thread has completed.
771 if (!(MethodDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) &&
772 (MethodDesc->Method.ThreadCount == 1))
774 /* Delete any direct children of (created by) this method */
776 AcpiNsDeleteNamespaceSubtree (WalkState->MethodNode);
779 * Delete any objects that were created by this method
780 * elsewhere in the namespace (if any were created).
781 * Use of the ACPI_METHOD_MODIFIED_NAMESPACE optimizes the
782 * deletion such that we don't have to perform an entire
783 * namespace walk for every control method execution.
785 if (MethodDesc->Method.InfoFlags & ACPI_METHOD_MODIFIED_NAMESPACE)
787 AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId);
788 MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_MODIFIED_NAMESPACE;
793 /* Decrement the thread count on the method */
795 if (MethodDesc->Method.ThreadCount)
797 MethodDesc->Method.ThreadCount--;
801 ACPI_ERROR ((AE_INFO,
802 "Invalid zero thread count in method"));
805 /* Are there any other threads currently executing this method? */
807 if (MethodDesc->Method.ThreadCount)
810 * Additional threads. Do not release the OwnerId in this case,
811 * we immediately reuse it for the next thread executing this method
813 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
814 "*** Completed execution of one thread, %u threads remaining\n",
815 MethodDesc->Method.ThreadCount));
819 /* This is the only executing thread for this method */
822 * Support to dynamically change a method from NotSerialized to
823 * Serialized if it appears that the method is incorrectly written and
824 * does not support multiple thread execution. The best example of this
825 * is if such a method creates namespace objects and blocks. A second
826 * thread will fail with an AE_ALREADY_EXISTS exception.
828 * This code is here because we must wait until the last thread exits
829 * before marking the method as serialized.
831 if (MethodDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED_PENDING)
836 "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error",
837 WalkState->MethodNode->Name.Ascii));
841 * Method tried to create an object twice and was marked as
842 * "pending serialized". The probable cause is that the method
843 * cannot handle reentrancy.
845 * The method was created as NotSerialized, but it tried to create
846 * a named object and then blocked, causing the second thread
847 * entrance to begin and then fail. Workaround this problem by
848 * marking the method permanently as Serialized when the last
851 MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_SERIALIZED_PENDING;
852 MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED;
853 MethodDesc->Method.SyncLevel = 0;
856 /* No more threads, we can free the OwnerId */
858 if (!(MethodDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL))
860 AcpiUtReleaseOwnerId (&MethodDesc->Method.OwnerId);