ACPICA: Namespace: Fix dynamic table loading issues
[cascardo/linux.git] / drivers / acpi / acpica / exconfig.c
index a1d177d..578d5c8 100644 (file)
@@ -118,7 +118,8 @@ acpi_ex_add_table(u32 table_index,
        /* Execute any module-level code that was found in the table */
 
        acpi_ex_exit_interpreter();
-       if (acpi_gbl_group_module_level_code) {
+       if (!acpi_gbl_parse_table_as_term_list
+           && acpi_gbl_group_module_level_code) {
                acpi_ns_exec_module_code_list();
        }
        acpi_ex_enter_interpreter();
@@ -197,9 +198,10 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
                 * Find the node referenced by the root_path_string. This is the
                 * location within the namespace where the table will be loaded.
                 */
-               status =
-                   acpi_ns_get_node(start_node, operand[3]->string.pointer,
-                                    ACPI_NS_SEARCH_PARENT, &parent_node);
+               status = acpi_ns_get_node_unlocked(start_node,
+                                                  operand[3]->string.pointer,
+                                                  ACPI_NS_SEARCH_PARENT,
+                                                  &parent_node);
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
                }
@@ -219,9 +221,10 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
 
                /* Find the node referenced by the parameter_path_string */
 
-               status =
-                   acpi_ns_get_node(start_node, operand[4]->string.pointer,
-                                    ACPI_NS_SEARCH_PARENT, &parameter_node);
+               status = acpi_ns_get_node_unlocked(start_node,
+                                                  operand[4]->string.pointer,
+                                                  ACPI_NS_SEARCH_PARENT,
+                                                  &parameter_node);
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
                }