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 * Note, ACPI_METHOD_IGNORE_SYNC_LEVEL flag means that we will ignore the
191 * Sync Level mechanism for this method, even though it is now serialized.
192 * Otherwise, there can be conflicts with existing ASL code that actually
195 WalkState->MethodDesc->Method.SyncLevel = 0;
196 WalkState->MethodDesc->Method.InfoFlags |=
197 (ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL);
199 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
200 "Method serialized [%4.4s] %p - [%s] (%4.4X)\n",
201 WalkState->MethodNode->Name.Ascii, WalkState->MethodNode,
202 WalkState->OpInfo->Name, WalkState->Opcode));
204 /* Abort the parse, no need to examine this method any further */
206 return (AE_CTRL_TERMINATE);
210 /*******************************************************************************
212 * FUNCTION: AcpiDsMethodError
214 * PARAMETERS: Status - Execution status
215 * WalkState - Current state
219 * DESCRIPTION: Called on method error. Invoke the global exception handler if
220 * present, dump the method data if the disassembler is configured
222 * Note: Allows the exception handler to change the status code
224 ******************************************************************************/
229 ACPI_WALK_STATE *WalkState)
231 ACPI_FUNCTION_ENTRY ();
234 /* Ignore AE_OK and control exception codes */
236 if (ACPI_SUCCESS (Status) ||
237 (Status & AE_CODE_CONTROL))
242 /* Invoke the global exception handler */
244 if (AcpiGbl_ExceptionHandler)
246 /* Exit the interpreter, allow handler to execute methods */
248 AcpiExExitInterpreter ();
251 * Handler can map the exception code to anything it wants, including
252 * AE_OK, in which case the executing method will not be aborted.
254 Status = AcpiGbl_ExceptionHandler (Status,
255 WalkState->MethodNode ?
256 WalkState->MethodNode->Name.Integer : 0,
257 WalkState->Opcode, WalkState->AmlOffset, NULL);
258 AcpiExEnterInterpreter ();
261 AcpiDsClearImplicitReturn (WalkState);
263 #ifdef ACPI_DISASSEMBLER
264 if (ACPI_FAILURE (Status))
266 /* Display method locals/args if disassembler is present */
268 AcpiDmDumpMethodInfo (Status, WalkState, WalkState->Op);
276 /*******************************************************************************
278 * FUNCTION: AcpiDsCreateMethodMutex
280 * PARAMETERS: ObjDesc - The method object
284 * DESCRIPTION: Create a mutex object for a serialized control method
286 ******************************************************************************/
289 AcpiDsCreateMethodMutex (
290 ACPI_OPERAND_OBJECT *MethodDesc)
292 ACPI_OPERAND_OBJECT *MutexDesc;
296 ACPI_FUNCTION_TRACE (DsCreateMethodMutex);
299 /* Create the new mutex object */
301 MutexDesc = AcpiUtCreateInternalObject (ACPI_TYPE_MUTEX);
304 return_ACPI_STATUS (AE_NO_MEMORY);
307 /* Create the actual OS Mutex */
309 Status = AcpiOsCreateMutex (&MutexDesc->Mutex.OsMutex);
310 if (ACPI_FAILURE (Status))
312 AcpiUtDeleteObjectDesc (MutexDesc);
313 return_ACPI_STATUS (Status);
316 MutexDesc->Mutex.SyncLevel = MethodDesc->Method.SyncLevel;
317 MethodDesc->Method.Mutex = MutexDesc;
318 return_ACPI_STATUS (AE_OK);
322 /*******************************************************************************
324 * FUNCTION: AcpiDsBeginMethodExecution
326 * PARAMETERS: MethodNode - Node of the method
327 * ObjDesc - The method object
328 * WalkState - current state, NULL if not yet executing
333 * DESCRIPTION: Prepare a method for execution. Parses the method if necessary,
334 * increments the thread count, and waits at the method semaphore
335 * for clearance to execute.
337 ******************************************************************************/
340 AcpiDsBeginMethodExecution (
341 ACPI_NAMESPACE_NODE *MethodNode,
342 ACPI_OPERAND_OBJECT *ObjDesc,
343 ACPI_WALK_STATE *WalkState)
345 ACPI_STATUS Status = AE_OK;
348 ACPI_FUNCTION_TRACE_PTR (DsBeginMethodExecution, MethodNode);
353 return_ACPI_STATUS (AE_NULL_ENTRY);
356 /* Prevent wraparound of thread count */
358 if (ObjDesc->Method.ThreadCount == ACPI_UINT8_MAX)
360 ACPI_ERROR ((AE_INFO,
361 "Method reached maximum reentrancy limit (255)"));
362 return_ACPI_STATUS (AE_AML_METHOD_LIMIT);
366 * If this method is serialized, we need to acquire the method mutex.
368 if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED)
371 * Create a mutex for the method if it is defined to be Serialized
372 * and a mutex has not already been created. We defer the mutex creation
373 * until a method is actually executed, to minimize the object count
375 if (!ObjDesc->Method.Mutex)
377 Status = AcpiDsCreateMethodMutex (ObjDesc);
378 if (ACPI_FAILURE (Status))
380 return_ACPI_STATUS (Status);
385 * The CurrentSyncLevel (per-thread) must be less than or equal to
386 * the sync level of the method. This mechanism provides some
387 * deadlock prevention.
389 * If the method was auto-serialized, we just ignore the sync level
390 * mechanism, because auto-serialization of methods can interfere
391 * with ASL code that actually uses sync levels.
393 * Top-level method invocation has no walk state at this point
396 (!(ObjDesc->Method.InfoFlags & ACPI_METHOD_IGNORE_SYNC_LEVEL)) &&
397 (WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel))
399 ACPI_ERROR ((AE_INFO,
400 "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%u)",
401 AcpiUtGetNodeName (MethodNode),
402 WalkState->Thread->CurrentSyncLevel));
404 return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
408 * Obtain the method mutex if necessary. Do not acquire mutex for a
412 !ObjDesc->Method.Mutex->Mutex.ThreadId ||
413 (WalkState->Thread->ThreadId != ObjDesc->Method.Mutex->Mutex.ThreadId))
416 * Acquire the method mutex. This releases the interpreter if we
417 * block (and reacquires it before it returns)
419 Status = AcpiExSystemWaitMutex (ObjDesc->Method.Mutex->Mutex.OsMutex,
421 if (ACPI_FAILURE (Status))
423 return_ACPI_STATUS (Status);
426 /* Update the mutex and walk info and save the original SyncLevel */
430 ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
431 WalkState->Thread->CurrentSyncLevel;
433 ObjDesc->Method.Mutex->Mutex.ThreadId = WalkState->Thread->ThreadId;
434 WalkState->Thread->CurrentSyncLevel = ObjDesc->Method.SyncLevel;
438 ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
439 ObjDesc->Method.Mutex->Mutex.SyncLevel;
443 /* Always increase acquisition depth */
445 ObjDesc->Method.Mutex->Mutex.AcquisitionDepth++;
449 * Allocate an Owner ID for this method, only if this is the first thread
450 * to begin concurrent execution. We only need one OwnerId, even if the
451 * method is invoked recursively.
453 if (!ObjDesc->Method.OwnerId)
455 Status = AcpiUtAllocateOwnerId (&ObjDesc->Method.OwnerId);
456 if (ACPI_FAILURE (Status))
463 * Increment the method parse tree thread count since it has been
464 * reentered one more time (even if it is the same thread)
466 ObjDesc->Method.ThreadCount++;
468 return_ACPI_STATUS (Status);
472 /* On error, must release the method mutex (if present) */
474 if (ObjDesc->Method.Mutex)
476 AcpiOsReleaseMutex (ObjDesc->Method.Mutex->Mutex.OsMutex);
478 return_ACPI_STATUS (Status);
482 /*******************************************************************************
484 * FUNCTION: AcpiDsCallControlMethod
486 * PARAMETERS: Thread - Info for this thread
487 * ThisWalkState - Current walk state
488 * Op - Current Op to be walked
492 * DESCRIPTION: Transfer execution to a called control method
494 ******************************************************************************/
497 AcpiDsCallControlMethod (
498 ACPI_THREAD_STATE *Thread,
499 ACPI_WALK_STATE *ThisWalkState,
500 ACPI_PARSE_OBJECT *Op)
503 ACPI_NAMESPACE_NODE *MethodNode;
504 ACPI_WALK_STATE *NextWalkState = NULL;
505 ACPI_OPERAND_OBJECT *ObjDesc;
506 ACPI_EVALUATE_INFO *Info;
510 ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState);
512 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Calling method %p, currentstate=%p\n",
513 ThisWalkState->PrevOp, ThisWalkState));
516 * Get the namespace entry for the control method we are about to call
518 MethodNode = ThisWalkState->MethodCallNode;
521 return_ACPI_STATUS (AE_NULL_ENTRY);
524 ObjDesc = AcpiNsGetAttachedObject (MethodNode);
527 return_ACPI_STATUS (AE_NULL_OBJECT);
530 /* Init for new method, possibly wait on method mutex */
532 Status = AcpiDsBeginMethodExecution (MethodNode, ObjDesc,
534 if (ACPI_FAILURE (Status))
536 return_ACPI_STATUS (Status);
539 /* Begin method parse/execution. Create a new walk state */
541 NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwnerId,
542 NULL, ObjDesc, Thread);
545 Status = AE_NO_MEMORY;
550 * The resolved arguments were put on the previous walk state's operand
551 * stack. Operands on the previous walk state stack always
552 * start at index 0. Also, null terminate the list of arguments
554 ThisWalkState->Operands [ThisWalkState->NumOperands] = NULL;
557 * Allocate and initialize the evaluation information block
558 * TBD: this is somewhat inefficient, should change interface to
559 * DsInitAmlWalk. For now, keeps this struct off the CPU stack
561 Info = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
564 Status = AE_NO_MEMORY;
568 Info->Parameters = &ThisWalkState->Operands[0];
570 Status = AcpiDsInitAmlWalk (NextWalkState, NULL, MethodNode,
571 ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
572 Info, ACPI_IMODE_EXECUTE);
575 if (ACPI_FAILURE (Status))
581 * Delete the operands on the previous walkstate operand stack
582 * (they were copied to new objects)
584 for (i = 0; i < ObjDesc->Method.ParamCount; i++)
586 AcpiUtRemoveReference (ThisWalkState->Operands [i]);
587 ThisWalkState->Operands [i] = NULL;
590 /* Clear the operand stack */
592 ThisWalkState->NumOperands = 0;
594 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
595 "**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
596 MethodNode->Name.Ascii, NextWalkState));
598 /* Invoke an internal method if necessary */
600 if (ObjDesc->Method.InfoFlags & ACPI_METHOD_INTERNAL_ONLY)
602 Status = ObjDesc->Method.Dispatch.Implementation (NextWalkState);
605 Status = AE_CTRL_TERMINATE;
609 return_ACPI_STATUS (Status);
614 /* On error, we must terminate the method properly */
616 AcpiDsTerminateControlMethod (ObjDesc, NextWalkState);
619 AcpiDsDeleteWalkState (NextWalkState);
622 return_ACPI_STATUS (Status);
626 /*******************************************************************************
628 * FUNCTION: AcpiDsRestartControlMethod
630 * PARAMETERS: WalkState - State for preempted method (caller)
631 * ReturnDesc - Return value from the called method
635 * DESCRIPTION: Restart a method that was preempted by another (nested) method
636 * invocation. Handle the return value (if any) from the callee.
638 ******************************************************************************/
641 AcpiDsRestartControlMethod (
642 ACPI_WALK_STATE *WalkState,
643 ACPI_OPERAND_OBJECT *ReturnDesc)
646 int SameAsImplicitReturn;
649 ACPI_FUNCTION_TRACE_PTR (DsRestartControlMethod, WalkState);
652 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
653 "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
654 AcpiUtGetNodeName (WalkState->MethodNode),
655 WalkState->MethodCallOp, ReturnDesc));
657 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
658 " ReturnFromThisMethodUsed?=%X ResStack %p Walk %p\n",
659 WalkState->ReturnUsed,
660 WalkState->Results, WalkState));
662 /* Did the called method return a value? */
666 /* Is the implicit return object the same as the return desc? */
668 SameAsImplicitReturn = (WalkState->ImplicitReturnObj == ReturnDesc);
670 /* Are we actually going to use the return value? */
672 if (WalkState->ReturnUsed)
674 /* Save the return value from the previous method */
676 Status = AcpiDsResultPush (ReturnDesc, WalkState);
677 if (ACPI_FAILURE (Status))
679 AcpiUtRemoveReference (ReturnDesc);
680 return_ACPI_STATUS (Status);
684 * Save as THIS method's return value in case it is returned
685 * immediately to yet another method
687 WalkState->ReturnDesc = ReturnDesc;
691 * The following code is the optional support for the so-called
692 * "implicit return". Some AML code assumes that the last value of the
693 * method is "implicitly" returned to the caller, in the absence of an
694 * explicit return value.
696 * Just save the last result of the method as the return value.
698 * NOTE: this is optional because the ASL language does not actually
699 * support this behavior.
701 else if (!AcpiDsDoImplicitReturn (ReturnDesc, WalkState, FALSE) ||
702 SameAsImplicitReturn)
705 * Delete the return value if it will not be used by the
706 * calling method or remove one reference if the explicit return
707 * is the same as the implicit return value.
709 AcpiUtRemoveReference (ReturnDesc);
713 return_ACPI_STATUS (AE_OK);
717 /*******************************************************************************
719 * FUNCTION: AcpiDsTerminateControlMethod
721 * PARAMETERS: MethodDesc - Method object
722 * WalkState - State associated with the method
726 * DESCRIPTION: Terminate a control method. Delete everything that the method
727 * created, delete all locals and arguments, and delete the parse
730 * MUTEX: Interpreter is locked
732 ******************************************************************************/
735 AcpiDsTerminateControlMethod (
736 ACPI_OPERAND_OBJECT *MethodDesc,
737 ACPI_WALK_STATE *WalkState)
740 ACPI_FUNCTION_TRACE_PTR (DsTerminateControlMethod, WalkState);
743 /* MethodDesc is required, WalkState is optional */
752 /* Delete all arguments and locals */
754 AcpiDsMethodDataDeleteAll (WalkState);
757 * If method is serialized, release the mutex and restore the
758 * current sync level for this thread
760 if (MethodDesc->Method.Mutex)
762 /* Acquisition Depth handles recursive calls */
764 MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--;
765 if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth)
767 WalkState->Thread->CurrentSyncLevel =
768 MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel;
770 AcpiOsReleaseMutex (MethodDesc->Method.Mutex->Mutex.OsMutex);
771 MethodDesc->Method.Mutex->Mutex.ThreadId = 0;
776 * Delete any namespace objects created anywhere within the
777 * namespace by the execution of this method. Unless:
778 * 1) This method is a module-level executable code method, in which
779 * case we want make the objects permanent.
780 * 2) There are other threads executing the method, in which case we
781 * will wait until the last thread has completed.
783 if (!(MethodDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) &&
784 (MethodDesc->Method.ThreadCount == 1))
786 /* Delete any direct children of (created by) this method */
788 AcpiNsDeleteNamespaceSubtree (WalkState->MethodNode);
791 * Delete any objects that were created by this method
792 * elsewhere in the namespace (if any were created).
793 * Use of the ACPI_METHOD_MODIFIED_NAMESPACE optimizes the
794 * deletion such that we don't have to perform an entire
795 * namespace walk for every control method execution.
797 if (MethodDesc->Method.InfoFlags & ACPI_METHOD_MODIFIED_NAMESPACE)
799 AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId);
800 MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_MODIFIED_NAMESPACE;
805 /* Decrement the thread count on the method */
807 if (MethodDesc->Method.ThreadCount)
809 MethodDesc->Method.ThreadCount--;
813 ACPI_ERROR ((AE_INFO,
814 "Invalid zero thread count in method"));
817 /* Are there any other threads currently executing this method? */
819 if (MethodDesc->Method.ThreadCount)
822 * Additional threads. Do not release the OwnerId in this case,
823 * we immediately reuse it for the next thread executing this method
825 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
826 "*** Completed execution of one thread, %u threads remaining\n",
827 MethodDesc->Method.ThreadCount));
831 /* This is the only executing thread for this method */
834 * Support to dynamically change a method from NotSerialized to
835 * Serialized if it appears that the method is incorrectly written and
836 * does not support multiple thread execution. The best example of this
837 * is if such a method creates namespace objects and blocks. A second
838 * thread will fail with an AE_ALREADY_EXISTS exception.
840 * This code is here because we must wait until the last thread exits
841 * before marking the method as serialized.
843 if (MethodDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED_PENDING)
848 "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error",
849 WalkState->MethodNode->Name.Ascii));
853 * Method tried to create an object twice and was marked as
854 * "pending serialized". The probable cause is that the method
855 * cannot handle reentrancy.
857 * The method was created as NotSerialized, but it tried to create
858 * a named object and then blocked, causing the second thread
859 * entrance to begin and then fail. Workaround this problem by
860 * marking the method permanently as Serialized when the last
863 MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_SERIALIZED_PENDING;
864 MethodDesc->Method.InfoFlags |=
865 (ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL);
866 MethodDesc->Method.SyncLevel = 0;
869 /* No more threads, we can free the OwnerId */
871 if (!(MethodDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL))
873 AcpiUtReleaseOwnerId (&MethodDesc->Method.OwnerId);