aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2011-11-27 20:46:02 -0500
committerLen Brown <len.brown@intel.com>2012-01-17 03:36:25 -0500
commit8931d9ea78848b073bf299594f148b83abde4a5e (patch)
tree23df1b9c98f4a9ea7575586db88d7cf2343853f4
parent42f5284306465dc263ce227b0c5bd2c7dcd43cdf (diff)
ACPICA: Fix to allow region arguments to reference other scopes
Allow referenced objects to be in a different scope. http://www.acpica.org/bugzilla/show_bug.cgi?id=937 http://marc.info/?l=linux-acpi&m=131636632718222&w=2 ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110112/psargs-359) ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110112/nsinit-349) Scope (_SB) { Name (RAMB, 0xDF5A1018) OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000) } For above ASL code, we need to save scope node(\_SB) to lookup the argument node(\_SB.RAMB). Reported-by: Jim Green <student.northwestern@gmail.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/acpica/acobject.h1
-rw-r--r--drivers/acpi/acpica/dsargs.c2
-rw-r--r--drivers/acpi/acpica/excreate.c6
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index 1055769f2f01..6d276c20b57b 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -358,6 +358,7 @@ typedef enum {
358 */ 358 */
359struct acpi_object_extra { 359struct acpi_object_extra {
360 ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ 360 ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
361 struct acpi_namespace_node *scope_node;
361 void *region_context; /* Region-specific data */ 362 void *region_context; /* Region-specific data */
362 u8 *aml_start; 363 u8 *aml_start;
363 u32 aml_length; 364 u32 aml_length;
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c
index 42163d8db50b..d69e4a53175b 100644
--- a/drivers/acpi/acpica/dsargs.c
+++ b/drivers/acpi/acpica/dsargs.c
@@ -384,7 +384,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
384 384
385 /* Execute the argument AML */ 385 /* Execute the argument AML */
386 386
387 status = acpi_ds_execute_arguments(node, node->parent, 387 status = acpi_ds_execute_arguments(node, extra_desc->extra.scope_node,
388 extra_desc->extra.aml_length, 388 extra_desc->extra.aml_length,
389 extra_desc->extra.aml_start); 389 extra_desc->extra.aml_start);
390 if (ACPI_FAILURE(status)) { 390 if (ACPI_FAILURE(status)) {
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 110711afada8..8a06dc523af7 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -330,6 +330,12 @@ acpi_ex_create_region(u8 * aml_start,
330 region_obj2 = obj_desc->common.next_object; 330 region_obj2 = obj_desc->common.next_object;
331 region_obj2->extra.aml_start = aml_start; 331 region_obj2->extra.aml_start = aml_start;
332 region_obj2->extra.aml_length = aml_length; 332 region_obj2->extra.aml_length = aml_length;
333 if (walk_state->scope_info) {
334 region_obj2->extra.scope_node =
335 walk_state->scope_info->scope.node;
336 } else {
337 region_obj2->extra.scope_node = node;
338 }
333 339
334 /* Init the region from the operands */ 340 /* Init the region from the operands */
335 341