Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128022
b: refs/heads/master
c: 96411a6
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Dec 30, 2008
1 parent 309665c commit 77065cd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84d4db7c528e23f8c9ae0be12960549347003eeb
refs/heads/master: 96411a630412f057d365aa1e9de7d23c069d627a
29 changes: 25 additions & 4 deletions trunk/drivers/acpi/dispatcher/dsopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,9 +1140,28 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
op->common.aml_opcode, walk_state));

switch (op->common.aml_opcode) {
case AML_IF_OP:
case AML_WHILE_OP:

/*
* If this is an additional iteration of a while loop, continue.
* There is no need to allocate a new control state.
*/
if (walk_state->control_state) {
if (walk_state->control_state->control.aml_predicate_start
== (walk_state->parser_state.aml - 1)) {

/* Reset the state to start-of-loop */

walk_state->control_state->common.state =
ACPI_CONTROL_CONDITIONAL_EXECUTING;
break;
}
}

/*lint -fallthrough */

case AML_IF_OP:

/*
* IF/WHILE: Create a new control state to manage these
* constructs. We need to manage these as a stack, in order
Expand Down Expand Up @@ -1248,18 +1267,20 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
/* Predicate was true, go back and evaluate it again! */

status = AE_CTRL_PENDING;
walk_state->aml_last_while =
walk_state->control_state->control.aml_predicate_start;
break;
}

/* Predicate was false, terminate this while loop */

ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
"[WHILE_OP] termination! Op=%p\n", op));

/* Pop this control state and free it */

control_state =
acpi_ut_pop_generic_state(&walk_state->control_state);

walk_state->aml_last_while =
control_state->control.aml_predicate_start;
acpi_ut_delete_generic_state(control_state);
break;

Expand Down

0 comments on commit 77065cd

Please sign in to comment.