aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-04-10 11:06:39 -0400
committerLen Brown <len.brown@intel.com>2008-04-22 14:29:26 -0400
commit7f4ac9f91383a0707de559dc8fbca986fc2d302f (patch)
tree8a123e5ae28e845000a09be372fe3037bbadfd0b
parentd8841647de7c4aa3f3ff5b8b8c4a3f042e848ff0 (diff)
ACPICA: Fix for Load/LoadTable to specify load location
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>
-rw-r--r--drivers/acpi/executer/exconfig.c3
-rw-r--r--drivers/acpi/namespace/nsload.c2
-rw-r--r--drivers/acpi/namespace/nsparse.c18
-rw-r--r--include/acpi/acnamesp.h3
4 files changed, 20 insertions, 6 deletions
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index dbf1e6f33bba..b9543a7f5d21 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -368,7 +368,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
368 } 368 }
369 369
370 status = 370 status =
371 acpi_ex_add_table(table_index, acpi_gbl_root_node, &ddb_handle); 371 acpi_ex_add_table(table_index, walk_state->scope_info->scope.node,
372 &ddb_handle);
372 if (ACPI_FAILURE(status)) { 373 if (ACPI_FAILURE(status)) {
373 374
374 /* On error, table_ptr was deallocated above */ 375 /* On error, table_ptr was deallocated above */
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c
index d4f9654fd20f..545010dfd835 100644
--- a/drivers/acpi/namespace/nsload.c
+++ b/drivers/acpi/namespace/nsload.c
@@ -107,7 +107,7 @@ acpi_ns_load_table(acpi_native_uint table_index,
107 goto unlock; 107 goto unlock;
108 } 108 }
109 109
110 status = acpi_ns_parse_table(table_index, node->child); 110 status = acpi_ns_parse_table(table_index, node);
111 if (ACPI_SUCCESS(status)) { 111 if (ACPI_SUCCESS(status)) {
112 acpi_tb_set_table_loaded_flag(table_index, TRUE); 112 acpi_tb_set_table_loaded_flag(table_index, TRUE);
113 } else { 113 } else {
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c
index e696aa847990..86bd6e5920c7 100644
--- a/drivers/acpi/namespace/nsparse.c
+++ b/drivers/acpi/namespace/nsparse.c
@@ -64,7 +64,8 @@ ACPI_MODULE_NAME("nsparse")
64 ******************************************************************************/ 64 ******************************************************************************/
65acpi_status 65acpi_status
66acpi_ns_one_complete_parse(acpi_native_uint pass_number, 66acpi_ns_one_complete_parse(acpi_native_uint pass_number,
67 acpi_native_uint table_index) 67 acpi_native_uint table_index,
68 struct acpi_namespace_node * start_node)
68{ 69{
69 union acpi_parse_object *parse_root; 70 union acpi_parse_object *parse_root;
70 acpi_status status; 71 acpi_status status;
@@ -121,6 +122,13 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
121 return_ACPI_STATUS(status); 122 return_ACPI_STATUS(status);
122 } 123 }
123 124
125 /* start_node is the default location to load the table */
126
127 if (start_node && start_node != acpi_gbl_root_node) {
128 acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
129 walk_state);
130 }
131
124 /* Parse the AML */ 132 /* Parse the AML */
125 133
126 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n", 134 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n",
@@ -163,7 +171,9 @@ acpi_ns_parse_table(acpi_native_uint table_index,
163 * performs another complete parse of the AML. 171 * performs another complete parse of the AML.
164 */ 172 */
165 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n")); 173 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n"));
166 status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index); 174 status =
175 acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index,
176 start_node);
167 if (ACPI_FAILURE(status)) { 177 if (ACPI_FAILURE(status)) {
168 return_ACPI_STATUS(status); 178 return_ACPI_STATUS(status);
169 } 179 }
@@ -178,7 +188,9 @@ acpi_ns_parse_table(acpi_native_uint table_index,
178 * parse objects are all cached. 188 * parse objects are all cached.
179 */ 189 */
180 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n")); 190 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n"));
181 status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index); 191 status =
192 acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index,
193 start_node);
182 if (ACPI_FAILURE(status)) { 194 if (ACPI_FAILURE(status)) {
183 return_ACPI_STATUS(status); 195 return_ACPI_STATUS(status);
184 } 196 }
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h
index 5ef38a6c8a61..1cad10bd6df0 100644
--- a/include/acpi/acnamesp.h
+++ b/include/acpi/acnamesp.h
@@ -113,7 +113,8 @@ acpi_ns_parse_table(acpi_native_uint table_index,
113 113
114acpi_status 114acpi_status
115acpi_ns_one_complete_parse(acpi_native_uint pass_number, 115acpi_ns_one_complete_parse(acpi_native_uint pass_number,
116 acpi_native_uint table_index); 116 acpi_native_uint table_index,
117 struct acpi_namespace_node *start_node);
117 118
118/* 119/*
119 * nsaccess - Top-level namespace access 120 * nsaccess - Top-level namespace access