aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2013-08-08 03:29:32 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 14:11:39 -0500
commit82eb7924131196deccf9f09fd29d96960bc48200 (patch)
treee857c7af2b22f150783b5c0f95dd3f8301e3ba5b
parenta4c01ca3b76b28c41fb3b07a1eb1389dae24bf4a (diff)
ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and BufferField refs.
commit 63660e05ec719613b518547b40a1c501c10f0bc4 upstream. Previously, references to these objects were resolved only to the actual FieldUnit or BufferField object. The correct behavior is to resolve these references to an actual value. The problem is that DerefOf did not resolve these objects to actual values. An "Integer" object is simple, return the value. But a field in an operation region will require a read operation. For a BufferField, the appropriate data must be extracted from the parent buffer. NOTE: It appears that this issues is present in Windows7 but not Windows8. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/acpi/acpica/exoparg1.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c
index b60c877f5906..eaa0fcd9644b 100644
--- a/drivers/acpi/acpica/exoparg1.c
+++ b/drivers/acpi/acpica/exoparg1.c
@@ -991,11 +991,40 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
991 acpi_namespace_node 991 acpi_namespace_node
992 *) 992 *)
993 return_desc); 993 return_desc);
994 } 994 if (!return_desc) {
995 break;
996 }
997
998 /*
999 * June 2013:
1000 * buffer_fields/field_units require additional resolution
1001 */
1002 switch (return_desc->common.type) {
1003 case ACPI_TYPE_BUFFER_FIELD:
1004 case ACPI_TYPE_LOCAL_REGION_FIELD:
1005 case ACPI_TYPE_LOCAL_BANK_FIELD:
1006 case ACPI_TYPE_LOCAL_INDEX_FIELD:
1007
1008 status =
1009 acpi_ex_read_data_from_field
1010 (walk_state, return_desc,
1011 &temp_desc);
1012 if (ACPI_FAILURE(status)) {
1013 goto cleanup;
1014 }
995 1015
996 /* Add another reference to the object! */ 1016 return_desc = temp_desc;
1017 break;
997 1018
998 acpi_ut_add_reference(return_desc); 1019 default:
1020
1021 /* Add another reference to the object */
1022
1023 acpi_ut_add_reference
1024 (return_desc);
1025 break;
1026 }
1027 }
999 break; 1028 break;
1000 1029
1001 default: 1030 default: