]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPICA: Update behavior of CopyObject to match ACPI spec
authorLin Ming <ming.m.lin@intel.com>
Thu, 10 Apr 2008 15:06:43 +0000 (19:06 +0400)
committerLen Brown <len.brown@intel.com>
Tue, 22 Apr 2008 18:29:31 +0000 (14:29 -0400)
Fixed a problem where a CopyObject to RegionField, BankField, and
IndexField objects did not perform an implicit conversion as it
should. These types must retain their initial type permanently as
per the ACPI specification. However, a CopyObject to all other
object types should not perform an implicit conversion, as per
the ACPI specification.

http://www.acpica.org/bugzilla/show_bug.cgi?id=388

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
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/exstore.c

index 725614e277f8c9148abb8fc0a5aad93cb2cded64..36c0fccb137ac7b28406e2445166d813b7e286c6 100644 (file)
@@ -603,10 +603,17 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
 
        /* If no implicit conversion, drop into the default case below */
 
-       if ((!implicit_conversion) || (walk_state->opcode == AML_COPY_OP)) {
-
-               /* Force execution of default (no implicit conversion) */
-
+       if ((!implicit_conversion) ||
+           ((walk_state->opcode == AML_COPY_OP) &&
+            (target_type != ACPI_TYPE_LOCAL_REGION_FIELD) &&
+            (target_type != ACPI_TYPE_LOCAL_BANK_FIELD) &&
+            (target_type != ACPI_TYPE_LOCAL_INDEX_FIELD))) {
+               /*
+                * Force execution of default (no implicit conversion). Note:
+                * copy_object does not perform an implicit conversion, as per the ACPI
+                * spec -- except in case of region/bank/index fields -- because these
+                * objects must retain their original type permanently.
+                */
                target_type = ACPI_TYPE_ANY;
        }