diff options
-rw-r--r-- | drivers/acpi/dispatcher/dswload.c | 15 | ||||
-rw-r--r-- | drivers/acpi/parser/psparse.c | 5 |
2 files changed, 17 insertions, 3 deletions
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c index d60d0625b11..565d4557d0e 100644 --- a/drivers/acpi/dispatcher/dswload.c +++ b/drivers/acpi/dispatcher/dswload.c @@ -547,6 +547,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, acpi_status status; acpi_object_type object_type; char *buffer_ptr; + u32 flags; ACPI_FUNCTION_TRACE(ds_load2_begin_op); @@ -752,12 +753,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, break; } - /* Add new entry into namespace */ + flags = ACPI_NS_NO_UPSEARCH; + if (walk_state->pass_number == 3) { + + /* Execution mode, node cannot already exist */ + + flags |= ACPI_NS_ERROR_IF_FOUND; + } + + /* Add new entry or lookup existing entry */ status = acpi_ns_lookup(walk_state->scope_info, buffer_ptr, - object_type, ACPI_IMODE_LOAD_PASS2, - ACPI_NS_NO_UPSEARCH, walk_state, &(node)); + object_type, ACPI_IMODE_LOAD_PASS2, flags, + walk_state, &node); break; } diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index a02aa62fe1e..6e875cea17a 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c @@ -540,6 +540,11 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) if ((status == AE_ALREADY_EXISTS) && (!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. |