diff options
Diffstat (limited to 'drivers/acpi/parser/psloop.c')
| -rw-r--r-- | drivers/acpi/parser/psloop.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c index 00b072e15d19..e1541db3753a 100644 --- a/drivers/acpi/parser/psloop.c +++ b/drivers/acpi/parser/psloop.c | |||
| @@ -83,7 +83,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 83 | struct acpi_parse_state *parser_state; | 83 | struct acpi_parse_state *parser_state; |
| 84 | u8 *aml_op_start = NULL; | 84 | u8 *aml_op_start = NULL; |
| 85 | 85 | ||
| 86 | ACPI_FUNCTION_TRACE_PTR("ps_parse_loop", walk_state); | 86 | ACPI_FUNCTION_TRACE_PTR(ps_parse_loop, walk_state); |
| 87 | 87 | ||
| 88 | if (walk_state->descending_callback == NULL) { | 88 | if (walk_state->descending_callback == NULL) { |
| 89 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 89 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| @@ -95,6 +95,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 95 | #if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) | 95 | #if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) |
| 96 | 96 | ||
| 97 | if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) { | 97 | if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) { |
| 98 | |||
| 98 | /* We are restarting a preempted control method */ | 99 | /* We are restarting a preempted control method */ |
| 99 | 100 | ||
| 100 | if (acpi_ps_has_completed_scope(parser_state)) { | 101 | if (acpi_ps_has_completed_scope(parser_state)) { |
| @@ -128,7 +129,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 128 | 129 | ||
| 129 | } | 130 | } |
| 130 | ACPI_EXCEPTION((AE_INFO, status, | 131 | ACPI_EXCEPTION((AE_INFO, status, |
| 131 | "get_predicate Failed")); | 132 | "GetPredicate Failed")); |
| 132 | return_ACPI_STATUS(status); | 133 | return_ACPI_STATUS(status); |
| 133 | } | 134 | } |
| 134 | 135 | ||
| @@ -143,6 +144,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 143 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, | 144 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
| 144 | "Popped scope, Op=%p\n", op)); | 145 | "Popped scope, Op=%p\n", op)); |
| 145 | } else if (walk_state->prev_op) { | 146 | } else if (walk_state->prev_op) { |
| 147 | |||
| 146 | /* We were in the middle of an op */ | 148 | /* We were in the middle of an op */ |
| 147 | 149 | ||
| 148 | op = walk_state->prev_op; | 150 | op = walk_state->prev_op; |
| @@ -156,6 +158,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 156 | while ((parser_state->aml < parser_state->aml_end) || (op)) { | 158 | while ((parser_state->aml < parser_state->aml_end) || (op)) { |
| 157 | aml_op_start = parser_state->aml; | 159 | aml_op_start = parser_state->aml; |
| 158 | if (!op) { | 160 | if (!op) { |
| 161 | |||
| 159 | /* Get the next opcode from the AML stream */ | 162 | /* Get the next opcode from the AML stream */ |
| 160 | 163 | ||
| 161 | walk_state->aml_offset = | 164 | walk_state->aml_offset = |
| @@ -213,6 +216,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 213 | /* Create Op structure and append to parent's argument list */ | 216 | /* Create Op structure and append to parent's argument list */ |
| 214 | 217 | ||
| 215 | if (walk_state->op_info->flags & AML_NAMED) { | 218 | if (walk_state->op_info->flags & AML_NAMED) { |
| 219 | |||
| 216 | /* Allocate a new pre_op if necessary */ | 220 | /* Allocate a new pre_op if necessary */ |
| 217 | 221 | ||
| 218 | if (!pre_op) { | 222 | if (!pre_op) { |
| @@ -371,7 +375,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 371 | 375 | ||
| 372 | if (walk_state->op_info) { | 376 | if (walk_state->op_info) { |
| 373 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, | 377 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
| 374 | "Opcode %4.4X [%s] Op %p Aml %p aml_offset %5.5X\n", | 378 | "Opcode %4.4X [%s] Op %p Aml %p AmlOffset %5.5X\n", |
| 375 | (u32) op->common.aml_opcode, | 379 | (u32) op->common.aml_opcode, |
| 376 | walk_state->op_info->name, op, | 380 | walk_state->op_info->name, op, |
| 377 | parser_state->aml, | 381 | parser_state->aml, |
| @@ -388,6 +392,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 388 | /* Are there any arguments that must be processed? */ | 392 | /* Are there any arguments that must be processed? */ |
| 389 | 393 | ||
| 390 | if (walk_state->arg_types) { | 394 | if (walk_state->arg_types) { |
| 395 | |||
| 391 | /* Get arguments */ | 396 | /* Get arguments */ |
| 392 | 397 | ||
| 393 | switch (op->common.aml_opcode) { | 398 | switch (op->common.aml_opcode) { |
| @@ -742,7 +747,19 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 742 | if (ACPI_FAILURE(status2)) { | 747 | if (ACPI_FAILURE(status2)) { |
| 743 | return_ACPI_STATUS(status2); | 748 | return_ACPI_STATUS(status2); |
| 744 | } | 749 | } |
| 750 | |||
| 751 | status2 = | ||
| 752 | acpi_ds_result_stack_pop | ||
| 753 | (walk_state); | ||
| 754 | if (ACPI_FAILURE(status2)) { | ||
| 755 | return_ACPI_STATUS(status2); | ||
| 756 | } | ||
| 757 | |||
| 758 | acpi_ut_delete_generic_state | ||
| 759 | (acpi_ut_pop_generic_state | ||
| 760 | (&walk_state->control_state)); | ||
| 745 | } | 761 | } |
| 762 | |||
| 746 | acpi_ps_pop_scope(parser_state, &op, | 763 | acpi_ps_pop_scope(parser_state, &op, |
| 747 | &walk_state->arg_types, | 764 | &walk_state->arg_types, |
| 748 | &walk_state->arg_count); | 765 | &walk_state->arg_count); |
| @@ -762,6 +779,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 762 | return_ACPI_STATUS(status2); | 779 | return_ACPI_STATUS(status2); |
| 763 | } | 780 | } |
| 764 | } | 781 | } |
| 782 | |||
| 765 | acpi_ps_pop_scope(parser_state, &op, | 783 | acpi_ps_pop_scope(parser_state, &op, |
| 766 | &walk_state->arg_types, | 784 | &walk_state->arg_types, |
| 767 | &walk_state->arg_count); | 785 | &walk_state->arg_count); |
| @@ -853,6 +871,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
| 853 | } | 871 | } |
| 854 | 872 | ||
| 855 | else if (ACPI_FAILURE(status)) { | 873 | else if (ACPI_FAILURE(status)) { |
| 874 | |||
| 856 | /* First error is most important */ | 875 | /* First error is most important */ |
| 857 | 876 | ||
| 858 | (void) | 877 | (void) |
