diff options
Diffstat (limited to 'drivers/acpi/parser/psparse.c')
-rw-r--r-- | drivers/acpi/parser/psparse.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 7ee2f2e77525..a02aa62fe1e5 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c | |||
@@ -469,6 +469,16 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
469 | } | 469 | } |
470 | 470 | ||
471 | walk_state->thread = thread; | 471 | walk_state->thread = thread; |
472 | |||
473 | /* | ||
474 | * If executing a method, the starting sync_level is this method's | ||
475 | * sync_level | ||
476 | */ | ||
477 | if (walk_state->method_desc) { | ||
478 | walk_state->thread->current_sync_level = | ||
479 | walk_state->method_desc->method.sync_level; | ||
480 | } | ||
481 | |||
472 | acpi_ds_push_walk_state(walk_state, thread); | 482 | acpi_ds_push_walk_state(walk_state, thread); |
473 | 483 | ||
474 | /* | 484 | /* |
@@ -505,6 +515,10 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
505 | status = | 515 | status = |
506 | acpi_ds_call_control_method(thread, walk_state, | 516 | acpi_ds_call_control_method(thread, walk_state, |
507 | NULL); | 517 | NULL); |
518 | if (ACPI_FAILURE(status)) { | ||
519 | status = | ||
520 | acpi_ds_method_error(status, walk_state); | ||
521 | } | ||
508 | 522 | ||
509 | /* | 523 | /* |
510 | * If the transfer to the new method method call worked, a new walk | 524 | * If the transfer to the new method method call worked, a new walk |
@@ -525,7 +539,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
525 | /* Check for possible multi-thread reentrancy problem */ | 539 | /* Check for possible multi-thread reentrancy problem */ |
526 | 540 | ||
527 | if ((status == AE_ALREADY_EXISTS) && | 541 | if ((status == AE_ALREADY_EXISTS) && |
528 | (!walk_state->method_desc->method.semaphore)) { | 542 | (!walk_state->method_desc->method.mutex)) { |
529 | /* | 543 | /* |
530 | * Method tried to create an object twice. The probable cause is | 544 | * Method tried to create an object twice. The probable cause is |
531 | * that the method cannot handle reentrancy. | 545 | * that the method cannot handle reentrancy. |
@@ -537,7 +551,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
537 | */ | 551 | */ |
538 | walk_state->method_desc->method.method_flags |= | 552 | walk_state->method_desc->method.method_flags |= |
539 | AML_METHOD_SERIALIZED; | 553 | AML_METHOD_SERIALIZED; |
540 | walk_state->method_desc->method.concurrency = 1; | 554 | walk_state->method_desc->method.sync_level = 0; |
541 | } | 555 | } |
542 | } | 556 | } |
543 | 557 | ||