]> err.no Git - linux-2.6/commitdiff
ACPICA: Fix for Load/LoadTable to specify load location
authorBob Moore <robert.moore@intel.com>
Thu, 10 Apr 2008 15:06:39 +0000 (19:06 +0400)
committerLen Brown <len.brown@intel.com>
Tue, 22 Apr 2008 18:29:26 +0000 (14:29 -0400)
Fixed a problem with the Load and LoadTable operators where
the table location within the namespace was ignored. Instead,
the table was always loaded into the root or current scope.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/executer/exconfig.c
drivers/acpi/namespace/nsload.c
drivers/acpi/namespace/nsparse.c
include/acpi/acnamesp.h

index dbf1e6f33bba2f9628b5f46c160ea056b9e24c6b..b9543a7f5d21cd117e149d57982cdf39e7710d3a 100644 (file)
@@ -368,7 +368,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
        }
 
        status =
-           acpi_ex_add_table(table_index, acpi_gbl_root_node, &ddb_handle);
+           acpi_ex_add_table(table_index, walk_state->scope_info->scope.node,
+                             &ddb_handle);
        if (ACPI_FAILURE(status)) {
 
                /* On error, table_ptr was deallocated above */
index d4f9654fd20f315289d02af1cdb33bd335088e38..545010dfd8357b38b2f16f5d62c3471629095bf1 100644 (file)
@@ -107,7 +107,7 @@ acpi_ns_load_table(acpi_native_uint table_index,
                goto unlock;
        }
 
-       status = acpi_ns_parse_table(table_index, node->child);
+       status = acpi_ns_parse_table(table_index, node);
        if (ACPI_SUCCESS(status)) {
                acpi_tb_set_table_loaded_flag(table_index, TRUE);
        } else {
index e696aa8479909a5cf273813d008fa2366e9d8fd7..86bd6e5920c7baa1165e8d2e0da8024ea24a3468 100644 (file)
@@ -64,7 +64,8 @@ ACPI_MODULE_NAME("nsparse")
  ******************************************************************************/
 acpi_status
 acpi_ns_one_complete_parse(acpi_native_uint pass_number,
-                          acpi_native_uint table_index)
+                          acpi_native_uint table_index,
+                          struct acpi_namespace_node * start_node)
 {
        union acpi_parse_object *parse_root;
        acpi_status status;
@@ -121,6 +122,13 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
                return_ACPI_STATUS(status);
        }
 
+       /* start_node is the default location to load the table */
+
+       if (start_node && start_node != acpi_gbl_root_node) {
+               acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
+                                        walk_state);
+       }
+
        /* Parse the AML */
 
        ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n",
@@ -163,7 +171,9 @@ acpi_ns_parse_table(acpi_native_uint table_index,
         * performs another complete parse of the AML.
         */
        ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n"));
-       status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index);
+       status =
+           acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index,
+                                      start_node);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -178,7 +188,9 @@ acpi_ns_parse_table(acpi_native_uint table_index,
         * parse objects are all cached.
         */
        ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n"));
-       status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index);
+       status =
+           acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index,
+                                      start_node);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
index 5ef38a6c8a6154c3c4dc0a29c347a6e10b98079e..1cad10bd6df09e8787345f00c5b21d7c580357ec 100644 (file)
@@ -113,7 +113,8 @@ acpi_ns_parse_table(acpi_native_uint table_index,
 
 acpi_status
 acpi_ns_one_complete_parse(acpi_native_uint pass_number,
-                          acpi_native_uint table_index);
+                          acpi_native_uint table_index,
+                          struct acpi_namespace_node *start_node);
 
 /*
  * nsaccess - Top-level namespace access