X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Facpi%2Fparser%2Fpsparse.c;h=5d63f48e56b5cadc475b0af1206be28ba2c83d35;hp=7ee2f2e7752515154e6c7bf2339af7bacc6c71ae;hb=58a3bb59973e33a428d72fa530a3d1d81feb0e8f;hpb=61b9175808670d9abf52156803ae0ed1e3706ac4 diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 7ee2f2e77525..5d63f48e56b5 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2006, R. Byron Moore + * Copyright (C) 2000 - 2007, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -469,6 +469,16 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) } walk_state->thread = thread; + + /* + * If executing a method, the starting sync_level is this method's + * sync_level + */ + if (walk_state->method_desc) { + walk_state->thread->current_sync_level = + walk_state->method_desc->method.sync_level; + } + acpi_ds_push_walk_state(walk_state, thread); /* @@ -505,6 +515,10 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) status = acpi_ds_call_control_method(thread, walk_state, NULL); + if (ACPI_FAILURE(status)) { + status = + acpi_ds_method_error(status, walk_state); + } /* * If the transfer to the new method method call worked, a new walk @@ -525,7 +539,12 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) /* Check for possible multi-thread reentrancy problem */ if ((status == AE_ALREADY_EXISTS) && - (!walk_state->method_desc->method.semaphore)) { + (!walk_state->method_desc->method.mutex)) { + ACPI_INFO((AE_INFO, + "Marking method %4.4s as Serialized", + walk_state->method_node->name. + ascii)); + /* * Method tried to create an object twice. The probable cause is * that the method cannot handle reentrancy. @@ -537,7 +556,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) */ walk_state->method_desc->method.method_flags |= AML_METHOD_SERIALIZED; - walk_state->method_desc->method.concurrency = 1; + walk_state->method_desc->method.sync_level = 0; } }