49 #ifdef ACPI_DISASSEMBLER
50 #include <acpi/acdisasm.h>
53 #define _COMPONENT ACPI_DISPATCHER
100 walk_state->method_node ?
101 walk_state->method_node->
104 walk_state->aml_offset,
111 #ifdef ACPI_DISASSEMBLER
116 acpi_dm_dump_method_info(status, walk_state, walk_state->op);
157 mutex_desc->
mutex.sync_level = method_desc->
method.sync_level;
158 method_desc->
method.mutex = mutex_desc;
196 "Method reached maximum reentrancy limit (255)"));
209 if (!obj_desc->
method.mutex) {
210 status = acpi_ds_create_method_mutex(obj_desc);
224 (walk_state->
thread->current_sync_level >
225 obj_desc->
method.mutex->mutex.sync_level)) {
227 "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%u)",
229 walk_state->
thread->current_sync_level));
239 !obj_desc->
method.mutex->mutex.thread_id ||
240 (walk_state->
thread->thread_id !=
241 obj_desc->
method.mutex->mutex.thread_id)) {
257 obj_desc->
method.mutex->mutex.
258 original_sync_level =
259 walk_state->
thread->current_sync_level;
261 obj_desc->
method.mutex->mutex.thread_id =
262 walk_state->
thread->thread_id;
263 walk_state->
thread->current_sync_level =
264 obj_desc->
method.sync_level;
266 obj_desc->
method.mutex->mutex.
267 original_sync_level =
268 obj_desc->
method.mutex->mutex.sync_level;
274 obj_desc->
method.mutex->mutex.acquisition_depth++;
282 if (!obj_desc->
method.owner_id) {
293 obj_desc->
method.thread_count++;
299 if (obj_desc->
method.mutex) {
334 "Calling method %p, currentstate=%p\n",
335 this_walk_state->
prev_op, this_walk_state));
361 NULL, obj_desc, thread);
362 if (!next_walk_state) {
387 obj_desc->
method.aml_start,
388 obj_desc->
method.aml_length, info,
400 for (i = 0; i < obj_desc->
method.param_count; i++) {
410 "**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
411 method_node->
name.
ascii, next_walk_state));
417 obj_desc->
method.dispatch.implementation(next_walk_state);
418 if (status ==
AE_OK) {
430 if (next_walk_state) {
456 int same_as_implicit_return;
461 "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
466 " ReturnFromThisMethodUsed?=%X ResStack %p Walk %p\n",
468 walk_state->
results, walk_state));
476 same_as_implicit_return =
510 (return_desc, walk_state,
FALSE)
511 || same_as_implicit_return) {
564 if (method_desc->
method.mutex) {
568 method_desc->
method.mutex->mutex.acquisition_depth--;
569 if (!method_desc->
method.mutex->mutex.acquisition_depth) {
570 walk_state->
thread->current_sync_level =
571 method_desc->
method.mutex->mutex.
575 mutex->mutex.os_mutex);
576 method_desc->
method.mutex->mutex.thread_id = 0;
589 && (method_desc->
method.thread_count == 1)) {
608 method_desc->
method.info_flags &=
609 ~ACPI_METHOD_MODIFIED_NAMESPACE;
616 if (method_desc->
method.thread_count) {
617 method_desc->
method.thread_count--;
624 if (method_desc->
method.thread_count) {
630 "*** Completed execution of one thread, %u threads remaining\n",
631 method_desc->
method.thread_count));
649 "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error",
665 method_desc->
method.info_flags &=
666 ~ACPI_METHOD_SERIALIZED_PENDING;
667 method_desc->
method.info_flags |=
669 method_desc->
method.sync_level = 0;