// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.01/******************************************************************************2*3* Module Name: dsmethod - Parser/Interpreter interface - control method parsing4*5* Copyright (C) 2000 - 2025, Intel Corp.6*7*****************************************************************************/89#include <acpi/acpi.h>10#include "accommon.h"11#include "acdispat.h"12#include "acinterp.h"13#include "acnamesp.h"14#include "acparser.h"15#include "amlcode.h"16#include "acdebug.h"1718#define _COMPONENT ACPI_DISPATCHER19ACPI_MODULE_NAME("dsmethod")2021/* Local prototypes */22static acpi_status23acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,24union acpi_parse_object **out_op);2526static acpi_status27acpi_ds_create_method_mutex(union acpi_operand_object *method_desc);2829/*******************************************************************************30*31* FUNCTION: acpi_ds_auto_serialize_method32*33* PARAMETERS: node - Namespace Node of the method34* obj_desc - Method object attached to node35*36* RETURN: Status37*38* DESCRIPTION: Parse a control method AML to scan for control methods that39* need serialization due to the creation of named objects.40*41* NOTE: It is a bit of overkill to mark all such methods serialized, since42* there is only a problem if the method actually blocks during execution.43* A blocking operation is, for example, a Sleep() operation, or any access44* to an operation region. However, it is probably not possible to easily45* detect whether a method will block or not, so we simply mark all suspicious46* methods as serialized.47*48* NOTE2: This code is essentially a generic routine for parsing a single49* control method.50*51******************************************************************************/5253acpi_status54acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,55union acpi_operand_object *obj_desc)56{57acpi_status status;58union acpi_parse_object *op = NULL;59struct acpi_walk_state *walk_state;6061ACPI_FUNCTION_TRACE_PTR(ds_auto_serialize_method, node);6263ACPI_DEBUG_PRINT((ACPI_DB_PARSE,64"Method auto-serialization parse [%4.4s] %p\n",65acpi_ut_get_node_name(node), node));6667/* Create/Init a root op for the method parse tree */6869op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start);70if (!op) {71return_ACPI_STATUS(AE_NO_MEMORY);72}7374acpi_ps_set_name(op, node->name.integer);75op->common.node = node;7677/* Create and initialize a new walk state */7879walk_state =80acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL);81if (!walk_state) {82acpi_ps_free_op(op);83return_ACPI_STATUS(AE_NO_MEMORY);84}8586status = acpi_ds_init_aml_walk(walk_state, op, node,87obj_desc->method.aml_start,88obj_desc->method.aml_length, NULL, 0);89if (ACPI_FAILURE(status)) {90acpi_ds_delete_walk_state(walk_state);91acpi_ps_free_op(op);92return_ACPI_STATUS(status);93}9495walk_state->descending_callback = acpi_ds_detect_named_opcodes;9697/* Parse the method, scan for creation of named objects */9899status = acpi_ps_parse_aml(walk_state);100101acpi_ps_delete_parse_tree(op);102return_ACPI_STATUS(status);103}104105/*******************************************************************************106*107* FUNCTION: acpi_ds_detect_named_opcodes108*109* PARAMETERS: walk_state - Current state of the parse tree walk110* out_op - Unused, required for parser interface111*112* RETURN: Status113*114* DESCRIPTION: Descending callback used during the loading of ACPI tables.115* Currently used to detect methods that must be marked serialized116* in order to avoid problems with the creation of named objects.117*118******************************************************************************/119120static acpi_status121acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,122union acpi_parse_object **out_op)123{124125ACPI_FUNCTION_NAME(acpi_ds_detect_named_opcodes);126127/* We are only interested in opcodes that create a new name */128129if (!130(walk_state->op_info->131flags & (AML_NAMED | AML_CREATE | AML_FIELD))) {132return (AE_OK);133}134135/*136* At this point, we know we have a Named object opcode.137* Mark the method as serialized. Later code will create a mutex for138* this method to enforce serialization.139*140* Note, ACPI_METHOD_IGNORE_SYNC_LEVEL flag means that we will ignore the141* Sync Level mechanism for this method, even though it is now serialized.142* Otherwise, there can be conflicts with existing ASL code that actually143* uses sync levels.144*/145walk_state->method_desc->method.sync_level = 0;146walk_state->method_desc->method.info_flags |=147(ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL);148149ACPI_DEBUG_PRINT((ACPI_DB_INFO,150"Method serialized [%4.4s] %p - [%s] (%4.4X)\n",151walk_state->method_node->name.ascii,152walk_state->method_node, walk_state->op_info->name,153walk_state->opcode));154155/* Abort the parse, no need to examine this method any further */156157return (AE_CTRL_TERMINATE);158}159160/*******************************************************************************161*162* FUNCTION: acpi_ds_method_error163*164* PARAMETERS: status - Execution status165* walk_state - Current state166*167* RETURN: Status168*169* DESCRIPTION: Called on method error. Invoke the global exception handler if170* present, dump the method data if the debugger is configured171*172* Note: Allows the exception handler to change the status code173*174******************************************************************************/175176acpi_status177acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)178{179u32 aml_offset;180acpi_name name = 0;181182ACPI_FUNCTION_ENTRY();183184/* Ignore AE_OK and control exception codes */185186if (ACPI_SUCCESS(status) || (status & AE_CODE_CONTROL)) {187return (status);188}189190/* Invoke the global exception handler */191192if (acpi_gbl_exception_handler) {193194/* Exit the interpreter, allow handler to execute methods */195196acpi_ex_exit_interpreter();197198/*199* Handler can map the exception code to anything it wants, including200* AE_OK, in which case the executing method will not be aborted.201*/202aml_offset = (u32)ACPI_PTR_DIFF(walk_state->aml,203walk_state->parser_state.204aml_start);205206if (walk_state->method_node) {207name = walk_state->method_node->name.integer;208} else if (walk_state->deferred_node) {209name = walk_state->deferred_node->name.integer;210}211212status = acpi_gbl_exception_handler(status, name,213walk_state->opcode,214aml_offset, NULL);215acpi_ex_enter_interpreter();216}217218acpi_ds_clear_implicit_return(walk_state);219220if (ACPI_FAILURE(status)) {221acpi_ds_dump_method_stack(status, walk_state, walk_state->op);222223/* Display method locals/args if debugger is present */224225#ifdef ACPI_DEBUGGER226acpi_db_dump_method_info(status, walk_state);227#endif228}229230return (status);231}232233/*******************************************************************************234*235* FUNCTION: acpi_ds_create_method_mutex236*237* PARAMETERS: obj_desc - The method object238*239* RETURN: Status240*241* DESCRIPTION: Create a mutex object for a serialized control method242*243******************************************************************************/244245static acpi_status246acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)247{248union acpi_operand_object *mutex_desc;249acpi_status status;250251ACPI_FUNCTION_TRACE(ds_create_method_mutex);252253/* Create the new mutex object */254255mutex_desc = acpi_ut_create_internal_object(ACPI_TYPE_MUTEX);256if (!mutex_desc) {257return_ACPI_STATUS(AE_NO_MEMORY);258}259260/* Create the actual OS Mutex */261262status = acpi_os_create_mutex(&mutex_desc->mutex.os_mutex);263if (ACPI_FAILURE(status)) {264acpi_ut_delete_object_desc(mutex_desc);265return_ACPI_STATUS(status);266}267268mutex_desc->mutex.sync_level = method_desc->method.sync_level;269method_desc->method.mutex = mutex_desc;270return_ACPI_STATUS(AE_OK);271}272273/*******************************************************************************274*275* FUNCTION: acpi_ds_begin_method_execution276*277* PARAMETERS: method_node - Node of the method278* obj_desc - The method object279* walk_state - current state, NULL if not yet executing280* a method.281*282* RETURN: Status283*284* DESCRIPTION: Prepare a method for execution. Parses the method if necessary,285* increments the thread count, and waits at the method semaphore286* for clearance to execute.287*288******************************************************************************/289290acpi_status291acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,292union acpi_operand_object *obj_desc,293struct acpi_walk_state *walk_state)294{295acpi_status status = AE_OK;296297ACPI_FUNCTION_TRACE_PTR(ds_begin_method_execution, method_node);298299if (!method_node) {300return_ACPI_STATUS(AE_NULL_ENTRY);301}302303acpi_ex_start_trace_method(method_node, obj_desc, walk_state);304305/* Prevent wraparound of thread count */306307if (obj_desc->method.thread_count == ACPI_UINT8_MAX) {308ACPI_ERROR((AE_INFO,309"Method reached maximum reentrancy limit (255)"));310return_ACPI_STATUS(AE_AML_METHOD_LIMIT);311}312313/*314* If this method is serialized, we need to acquire the method mutex.315*/316if (obj_desc->method.info_flags & ACPI_METHOD_SERIALIZED) {317/*318* Create a mutex for the method if it is defined to be Serialized319* and a mutex has not already been created. We defer the mutex creation320* until a method is actually executed, to minimize the object count321*/322if (!obj_desc->method.mutex) {323status = acpi_ds_create_method_mutex(obj_desc);324if (ACPI_FAILURE(status)) {325return_ACPI_STATUS(status);326}327}328329/*330* The current_sync_level (per-thread) must be less than or equal to331* the sync level of the method. This mechanism provides some332* deadlock prevention.333*334* If the method was auto-serialized, we just ignore the sync level335* mechanism, because auto-serialization of methods can interfere336* with ASL code that actually uses sync levels.337*338* Top-level method invocation has no walk state at this point339*/340if (walk_state &&341(!(obj_desc->method.342info_flags & ACPI_METHOD_IGNORE_SYNC_LEVEL))343&& (walk_state->thread->current_sync_level >344obj_desc->method.mutex->mutex.sync_level)) {345ACPI_ERROR((AE_INFO,346"Cannot acquire Mutex for method [%4.4s]"347", current SyncLevel is too large (%u)",348acpi_ut_get_node_name(method_node),349walk_state->thread->current_sync_level));350351return_ACPI_STATUS(AE_AML_MUTEX_ORDER);352}353354/*355* Obtain the method mutex if necessary. Do not acquire mutex for a356* recursive call.357*/358if (!walk_state ||359!obj_desc->method.mutex->mutex.thread_id ||360(walk_state->thread->thread_id !=361obj_desc->method.mutex->mutex.thread_id)) {362/*363* Acquire the method mutex. This releases the interpreter if we364* block (and reacquires it before it returns)365*/366status =367acpi_ex_system_wait_mutex(obj_desc->method.mutex->368mutex.os_mutex,369ACPI_WAIT_FOREVER);370if (ACPI_FAILURE(status)) {371return_ACPI_STATUS(status);372}373374/* Update the mutex and walk info and save the original sync_level */375376if (walk_state) {377obj_desc->method.mutex->mutex.378original_sync_level =379walk_state->thread->current_sync_level;380381obj_desc->method.mutex->mutex.thread_id =382walk_state->thread->thread_id;383384/*385* Update the current sync_level only if this is not an auto-386* serialized method. In the auto case, we have to ignore387* the sync level for the method mutex (created for the388* auto-serialization) because we have no idea of what the389* sync level should be. Therefore, just ignore it.390*/391if (!(obj_desc->method.info_flags &392ACPI_METHOD_IGNORE_SYNC_LEVEL)) {393walk_state->thread->current_sync_level =394obj_desc->method.sync_level;395}396} else {397obj_desc->method.mutex->mutex.398original_sync_level =399obj_desc->method.mutex->mutex.sync_level;400401obj_desc->method.mutex->mutex.thread_id =402acpi_os_get_thread_id();403}404}405406/* Always increase acquisition depth */407408obj_desc->method.mutex->mutex.acquisition_depth++;409}410411/*412* Allocate an Owner ID for this method, only if this is the first thread413* to begin concurrent execution. We only need one owner_id, even if the414* method is invoked recursively.415*/416if (!obj_desc->method.owner_id) {417status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id);418if (ACPI_FAILURE(status)) {419goto cleanup;420}421}422423/*424* Increment the method parse tree thread count since it has been425* reentered one more time (even if it is the same thread)426*/427obj_desc->method.thread_count++;428acpi_method_count++;429return_ACPI_STATUS(status);430431cleanup:432/* On error, must release the method mutex (if present) */433434if (obj_desc->method.mutex) {435acpi_os_release_mutex(obj_desc->method.mutex->mutex.os_mutex);436}437return_ACPI_STATUS(status);438}439440/*******************************************************************************441*442* FUNCTION: acpi_ds_call_control_method443*444* PARAMETERS: thread - Info for this thread445* this_walk_state - Current walk state446* op - Current Op to be walked447*448* RETURN: Status449*450* DESCRIPTION: Transfer execution to a called control method451*452******************************************************************************/453454acpi_status455acpi_ds_call_control_method(struct acpi_thread_state *thread,456struct acpi_walk_state *this_walk_state,457union acpi_parse_object *op)458{459acpi_status status;460struct acpi_namespace_node *method_node;461struct acpi_walk_state *next_walk_state = NULL;462union acpi_operand_object *obj_desc;463struct acpi_evaluate_info *info;464465ACPI_FUNCTION_TRACE_PTR(ds_call_control_method, this_walk_state);466467ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,468"Calling method %p, currentstate=%p\n",469this_walk_state->prev_op, this_walk_state));470471/*472* Get the namespace entry for the control method we are about to call473*/474method_node = this_walk_state->method_call_node;475if (!method_node) {476return_ACPI_STATUS(AE_NULL_ENTRY);477}478479obj_desc = acpi_ns_get_attached_object(method_node);480if (!obj_desc) {481return_ACPI_STATUS(AE_NULL_OBJECT);482}483484if (this_walk_state->num_operands < obj_desc->method.param_count) {485ACPI_ERROR((AE_INFO, "Missing argument(s) for method [%4.4s]",486acpi_ut_get_node_name(method_node)));487488return_ACPI_STATUS(AE_AML_TOO_FEW_ARGUMENTS);489}490491else if (this_walk_state->num_operands > obj_desc->method.param_count) {492ACPI_ERROR((AE_INFO, "Too many arguments for method [%4.4s]",493acpi_ut_get_node_name(method_node)));494495return_ACPI_STATUS(AE_AML_TOO_MANY_ARGUMENTS);496}497498/* Init for new method, possibly wait on method mutex */499500status =501acpi_ds_begin_method_execution(method_node, obj_desc,502this_walk_state);503if (ACPI_FAILURE(status)) {504return_ACPI_STATUS(status);505}506507/* Begin method parse/execution. Create a new walk state */508509next_walk_state =510acpi_ds_create_walk_state(obj_desc->method.owner_id, NULL, obj_desc,511thread);512if (!next_walk_state) {513status = AE_NO_MEMORY;514goto cleanup;515}516517/*518* The resolved arguments were put on the previous walk state's operand519* stack. Operands on the previous walk state stack always520* start at index 0. Also, null terminate the list of arguments521*/522this_walk_state->operands[this_walk_state->num_operands] = NULL;523524/*525* Allocate and initialize the evaluation information block526* TBD: this is somewhat inefficient, should change interface to527* ds_init_aml_walk. For now, keeps this struct off the CPU stack528*/529info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));530if (!info) {531status = AE_NO_MEMORY;532goto pop_walk_state;533}534535info->parameters = &this_walk_state->operands[0];536537status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node,538obj_desc->method.aml_start,539obj_desc->method.aml_length, info,540ACPI_IMODE_EXECUTE);541542ACPI_FREE(info);543if (ACPI_FAILURE(status)) {544goto pop_walk_state;545}546547next_walk_state->method_nesting_depth =548this_walk_state->method_nesting_depth + 1;549550/*551* Delete the operands on the previous walkstate operand stack552* (they were copied to new objects)553*/554acpi_ds_clear_operands(this_walk_state);555556ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,557"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",558method_node->name.ascii, next_walk_state));559560this_walk_state->method_pathname =561acpi_ns_get_normalized_pathname(method_node, TRUE);562this_walk_state->method_is_nested = TRUE;563564/* Optional object evaluation log */565566ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION,567"%-26s: %*s%s\n", " Nested method call",568next_walk_state->method_nesting_depth * 3, " ",569&this_walk_state->method_pathname[1]));570571/* Invoke an internal method if necessary */572573if (obj_desc->method.info_flags & ACPI_METHOD_INTERNAL_ONLY) {574status =575obj_desc->method.dispatch.implementation(next_walk_state);576if (status == AE_OK) {577status = AE_CTRL_TERMINATE;578}579}580581return_ACPI_STATUS(status);582583pop_walk_state:584585/* On error, pop the walk state to be deleted from thread */586587acpi_ds_pop_walk_state(thread);588589cleanup:590591/* On error, we must terminate the method properly */592593acpi_ds_terminate_control_method(obj_desc, next_walk_state);594acpi_ds_delete_walk_state(next_walk_state);595596return_ACPI_STATUS(status);597}598599/*******************************************************************************600*601* FUNCTION: acpi_ds_restart_control_method602*603* PARAMETERS: walk_state - State for preempted method (caller)604* return_desc - Return value from the called method605*606* RETURN: Status607*608* DESCRIPTION: Restart a method that was preempted by another (nested) method609* invocation. Handle the return value (if any) from the callee.610*611******************************************************************************/612613acpi_status614acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,615union acpi_operand_object *return_desc)616{617acpi_status status;618int same_as_implicit_return;619620ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state);621622ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,623"****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",624acpi_ut_get_node_name(walk_state->method_node),625walk_state->method_call_op, return_desc));626627ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,628" ReturnFromThisMethodUsed?=%X ResStack %p Walk %p\n",629walk_state->return_used,630walk_state->results, walk_state));631632/* Did the called method return a value? */633634if (return_desc) {635636/* Is the implicit return object the same as the return desc? */637638same_as_implicit_return =639(walk_state->implicit_return_obj == return_desc);640641/* Are we actually going to use the return value? */642643if (walk_state->return_used) {644645/* Save the return value from the previous method */646647status = acpi_ds_result_push(return_desc, walk_state);648if (ACPI_FAILURE(status)) {649acpi_ut_remove_reference(return_desc);650return_ACPI_STATUS(status);651}652653/*654* Save as THIS method's return value in case it is returned655* immediately to yet another method656*/657walk_state->return_desc = return_desc;658}659660/*661* The following code is the optional support for the so-called662* "implicit return". Some AML code assumes that the last value of the663* method is "implicitly" returned to the caller, in the absence of an664* explicit return value.665*666* Just save the last result of the method as the return value.667*668* NOTE: this is optional because the ASL language does not actually669* support this behavior.670*/671else if (!acpi_ds_do_implicit_return672(return_desc, walk_state, FALSE)673|| same_as_implicit_return) {674/*675* Delete the return value if it will not be used by the676* calling method or remove one reference if the explicit return677* is the same as the implicit return value.678*/679acpi_ut_remove_reference(return_desc);680}681}682683return_ACPI_STATUS(AE_OK);684}685686/*******************************************************************************687*688* FUNCTION: acpi_ds_terminate_control_method689*690* PARAMETERS: method_desc - Method object691* walk_state - State associated with the method692*693* RETURN: None694*695* DESCRIPTION: Terminate a control method. Delete everything that the method696* created, delete all locals and arguments, and delete the parse697* tree if requested.698*699* MUTEX: Interpreter is locked700*701******************************************************************************/702703void704acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,705struct acpi_walk_state *walk_state)706{707708ACPI_FUNCTION_TRACE_PTR(ds_terminate_control_method, walk_state);709710/* method_desc is required, walk_state is optional */711712if (!method_desc) {713return_VOID;714}715716if (walk_state) {717718/* Delete all arguments and locals */719720acpi_ds_method_data_delete_all(walk_state);721722/*723* Delete any namespace objects created anywhere within the724* namespace by the execution of this method. Unless:725* 1) This method is a module-level executable code method, in which726* case we want make the objects permanent.727* 2) There are other threads executing the method, in which case we728* will wait until the last thread has completed.729*/730if (!(method_desc->method.info_flags & ACPI_METHOD_MODULE_LEVEL)731&& (method_desc->method.thread_count == 1)) {732733/* Delete any direct children of (created by) this method */734735(void)acpi_ex_exit_interpreter();736acpi_ns_delete_namespace_subtree(walk_state->737method_node);738(void)acpi_ex_enter_interpreter();739740/*741* Delete any objects that were created by this method742* elsewhere in the namespace (if any were created).743* Use of the ACPI_METHOD_MODIFIED_NAMESPACE optimizes the744* deletion such that we don't have to perform an entire745* namespace walk for every control method execution.746*/747if (method_desc->method.748info_flags & ACPI_METHOD_MODIFIED_NAMESPACE) {749(void)acpi_ex_exit_interpreter();750acpi_ns_delete_namespace_by_owner(method_desc->751method.752owner_id);753(void)acpi_ex_enter_interpreter();754method_desc->method.info_flags &=755~ACPI_METHOD_MODIFIED_NAMESPACE;756}757}758759/*760* If method is serialized, release the mutex and restore the761* current sync level for this thread762*/763if (method_desc->method.mutex) {764765/* Acquisition Depth handles recursive calls */766767method_desc->method.mutex->mutex.acquisition_depth--;768if (!method_desc->method.mutex->mutex.acquisition_depth) {769walk_state->thread->current_sync_level =770method_desc->method.mutex->mutex.771original_sync_level;772773acpi_os_release_mutex(method_desc->method.774mutex->mutex.os_mutex);775method_desc->method.mutex->mutex.thread_id = 0;776}777}778}779780/* Decrement the thread count on the method */781782if (method_desc->method.thread_count) {783method_desc->method.thread_count--;784} else {785ACPI_ERROR((AE_INFO, "Invalid zero thread count in method"));786}787788/* Are there any other threads currently executing this method? */789790if (method_desc->method.thread_count) {791/*792* Additional threads. Do not release the owner_id in this case,793* we immediately reuse it for the next thread executing this method794*/795ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,796"*** Completed execution of one thread, %u threads remaining\n",797method_desc->method.thread_count));798} else {799/* This is the only executing thread for this method */800801/*802* Support to dynamically change a method from not_serialized to803* Serialized if it appears that the method is incorrectly written and804* does not support multiple thread execution. The best example of this805* is if such a method creates namespace objects and blocks. A second806* thread will fail with an AE_ALREADY_EXISTS exception.807*808* This code is here because we must wait until the last thread exits809* before marking the method as serialized.810*/811if (method_desc->method.812info_flags & ACPI_METHOD_SERIALIZED_PENDING) {813if (walk_state) {814ACPI_INFO(("Marking method %4.4s as Serialized "815"because of AE_ALREADY_EXISTS error",816walk_state->method_node->name.817ascii));818}819820/*821* Method tried to create an object twice and was marked as822* "pending serialized". The probable cause is that the method823* cannot handle reentrancy.824*825* The method was created as not_serialized, but it tried to create826* a named object and then blocked, causing the second thread827* entrance to begin and then fail. Workaround this problem by828* marking the method permanently as Serialized when the last829* thread exits here.830*/831method_desc->method.info_flags &=832~ACPI_METHOD_SERIALIZED_PENDING;833834method_desc->method.info_flags |=835(ACPI_METHOD_SERIALIZED |836ACPI_METHOD_IGNORE_SYNC_LEVEL);837method_desc->method.sync_level = 0;838}839840/* No more threads, we can free the owner_id */841842if (!843(method_desc->method.844info_flags & ACPI_METHOD_MODULE_LEVEL)) {845acpi_ut_release_owner_id(&method_desc->method.owner_id);846}847}848849acpi_ex_stop_trace_method((struct acpi_namespace_node *)method_desc->850method.node, method_desc, walk_state);851852return_VOID;853}854855856