aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r--drivers/acpi/executer/exprep.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
index 7719ae5d4f16..916234bf811c 100644
--- a/drivers/acpi/executer/exprep.c
+++ b/drivers/acpi/executer/exprep.c
@@ -519,13 +519,20 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
519 acpi_ut_add_reference(obj_desc->index_field.index_obj); 519 acpi_ut_add_reference(obj_desc->index_field.index_obj);
520 520
521 /* 521 /*
522 * February 2006: Changed to match MS behavior
523 *
522 * The value written to the Index register is the byte offset of the 524 * The value written to the Index register is the byte offset of the
523 * target field 525 * target field.
524 * Note: may change code to: ACPI_DIV_8 (Info->field_bit_position) 526 *
527 * Previously, the value was calculated as an index in terms of the
528 * width of the Data register, as below:
529 *
530 * obj_desc->index_field.Value = (u32)
531 * (Info->field_bit_position / ACPI_MUL_8 (
532 * obj_desc->Field.access_byte_width));
525 */ 533 */
526 obj_desc->index_field.value = (u32) 534 obj_desc->index_field.value =
527 (info->field_bit_position / 535 (u32) ACPI_DIV_8(info->field_bit_position);
528 ACPI_MUL_8(obj_desc->field.access_byte_width));
529 536
530 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 537 ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
531 "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", 538 "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n",