ACPICA: Fix to allow region arguments to reference other scopes
[linux-flexiantxendom0.git] / drivers / acpi / acpica / excreate.c
index ffac8c7..8a06dc5 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2010, Intel Corp.
+ * Copyright (C) 2000 - 2011, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -305,7 +305,8 @@ acpi_ex_create_region(u8 * aml_start,
         * range
         */
        if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) &&
-           (region_space < ACPI_USER_REGION_BEGIN)) {
+           (region_space < ACPI_USER_REGION_BEGIN) &&
+           (region_space != ACPI_ADR_SPACE_DATA_TABLE)) {
                ACPI_ERROR((AE_INFO, "Invalid AddressSpace type 0x%X",
                            region_space));
                return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID);
@@ -329,6 +330,12 @@ acpi_ex_create_region(u8 * aml_start,
        region_obj2 = obj_desc->common.next_object;
        region_obj2->extra.aml_start = aml_start;
        region_obj2->extra.aml_length = aml_length;
+       if (walk_state->scope_info) {
+               region_obj2->extra.scope_node =
+                   walk_state->scope_info->scope.node;
+       } else {
+               region_obj2->extra.scope_node = node;
+       }
 
        /* Init the region from the operands */