hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/acpi/acpica/dsmethod.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: dsmethod - Parser/Interpreter interface - control method parsing
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -517,7 +517,7 @@
517517 info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
518518 if (!info) {
519519 status = AE_NO_MEMORY;
520
- goto cleanup;
520
+ goto pop_walk_state;
521521 }
522522
523523 info->parameters = &this_walk_state->operands[0];
....@@ -529,8 +529,11 @@
529529
530530 ACPI_FREE(info);
531531 if (ACPI_FAILURE(status)) {
532
- goto cleanup;
532
+ goto pop_walk_state;
533533 }
534
+
535
+ next_walk_state->method_nesting_depth =
536
+ this_walk_state->method_nesting_depth + 1;
534537
535538 /*
536539 * Delete the operands on the previous walkstate operand stack
....@@ -549,6 +552,17 @@
549552 "**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
550553 method_node->name.ascii, next_walk_state));
551554
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
+
552566 /* Invoke an internal method if necessary */
553567
554568 if (obj_desc->method.info_flags & ACPI_METHOD_INTERNAL_ONLY) {
....@@ -561,6 +575,12 @@
561575
562576 return_ACPI_STATUS(status);
563577
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
+
564584 cleanup:
565585
566586 /* On error, we must terminate the method properly */