| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: dsmethod - Parser/Interpreter interface - control method parsing |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 517 | 517 | info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); |
|---|
| 518 | 518 | if (!info) { |
|---|
| 519 | 519 | status = AE_NO_MEMORY; |
|---|
| 520 | | - goto cleanup; |
|---|
| 520 | + goto pop_walk_state; |
|---|
| 521 | 521 | } |
|---|
| 522 | 522 | |
|---|
| 523 | 523 | info->parameters = &this_walk_state->operands[0]; |
|---|
| .. | .. |
|---|
| 529 | 529 | |
|---|
| 530 | 530 | ACPI_FREE(info); |
|---|
| 531 | 531 | if (ACPI_FAILURE(status)) { |
|---|
| 532 | | - goto cleanup; |
|---|
| 532 | + goto pop_walk_state; |
|---|
| 533 | 533 | } |
|---|
| 534 | + |
|---|
| 535 | + next_walk_state->method_nesting_depth = |
|---|
| 536 | + this_walk_state->method_nesting_depth + 1; |
|---|
| 534 | 537 | |
|---|
| 535 | 538 | /* |
|---|
| 536 | 539 | * Delete the operands on the previous walkstate operand stack |
|---|
| .. | .. |
|---|
| 549 | 552 | "**** Begin nested execution of [%4.4s] **** WalkState=%p\n", |
|---|
| 550 | 553 | method_node->name.ascii, next_walk_state)); |
|---|
| 551 | 554 | |
|---|
| 555 | + this_walk_state->method_pathname = |
|---|
| 556 | + acpi_ns_get_normalized_pathname(method_node, TRUE); |
|---|
| 557 | + this_walk_state->method_is_nested = TRUE; |
|---|
| 558 | + |
|---|
| 559 | + /* Optional object evaluation log */ |
|---|
| 560 | + |
|---|
| 561 | + ACPI_DEBUG_PRINT_RAW((ACPI_DB_EVALUATION, |
|---|
| 562 | + "%-26s: %*s%s\n", " Nested method call", |
|---|
| 563 | + next_walk_state->method_nesting_depth * 3, " ", |
|---|
| 564 | + &this_walk_state->method_pathname[1])); |
|---|
| 565 | + |
|---|
| 552 | 566 | /* Invoke an internal method if necessary */ |
|---|
| 553 | 567 | |
|---|
| 554 | 568 | if (obj_desc->method.info_flags & ACPI_METHOD_INTERNAL_ONLY) { |
|---|
| .. | .. |
|---|
| 561 | 575 | |
|---|
| 562 | 576 | return_ACPI_STATUS(status); |
|---|
| 563 | 577 | |
|---|
| 578 | +pop_walk_state: |
|---|
| 579 | + |
|---|
| 580 | + /* On error, pop the walk state to be deleted from thread */ |
|---|
| 581 | + |
|---|
| 582 | + acpi_ds_pop_walk_state(thread); |
|---|
| 583 | + |
|---|
| 564 | 584 | cleanup: |
|---|
| 565 | 585 | |
|---|
| 566 | 586 | /* On error, we must terminate the method properly */ |
|---|