aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exfldio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exfldio.c')
-rw-r--r--drivers/acpi/executer/exfldio.c60
1 files changed, 17 insertions, 43 deletions
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index ba6e08843c29..9fe27fd04a2f 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -94,10 +94,9 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
94 /* We must have a valid region */ 94 /* We must have a valid region */
95 95
96 if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) { 96 if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) {
97 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 97 ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n",
98 "Needed Region, found type %X (%s)\n", 98 ACPI_GET_OBJECT_TYPE(rgn_desc),
99 ACPI_GET_OBJECT_TYPE(rgn_desc), 99 acpi_ut_get_object_type_name(rgn_desc)));
100 acpi_ut_get_object_type_name(rgn_desc)));
101 100
102 return_ACPI_STATUS(AE_AML_OPERAND_TYPE); 101 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
103 } 102 }
@@ -162,31 +161,14 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
162 * than the region itself. For example, a region of length one 161 * than the region itself. For example, a region of length one
163 * byte, and a field with Dword access specified. 162 * byte, and a field with Dword access specified.
164 */ 163 */
165 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 164 ACPI_REPORT_ERROR(("Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", acpi_ut_get_node_name(obj_desc->common_field.node), obj_desc->common_field.access_byte_width, acpi_ut_get_node_name(rgn_desc->region.node), rgn_desc->region.length));
166 "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n",
167 acpi_ut_get_node_name(obj_desc->
168 common_field.
169 node),
170 obj_desc->common_field.
171 access_byte_width,
172 acpi_ut_get_node_name(rgn_desc->
173 region.node),
174 rgn_desc->region.length));
175 } 165 }
176 166
177 /* 167 /*
178 * Offset rounded up to next multiple of field width 168 * Offset rounded up to next multiple of field width
179 * exceeds region length, indicate an error 169 * exceeds region length, indicate an error
180 */ 170 */
181 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 171 ACPI_REPORT_ERROR(("Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", acpi_ut_get_node_name(obj_desc->common_field.node), obj_desc->common_field.base_byte_offset, field_datum_byte_offset, obj_desc->common_field.access_byte_width, acpi_ut_get_node_name(rgn_desc->region.node), rgn_desc->region.length));
182 "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n",
183 acpi_ut_get_node_name(obj_desc->common_field.
184 node),
185 obj_desc->common_field.base_byte_offset,
186 field_datum_byte_offset,
187 obj_desc->common_field.access_byte_width,
188 acpi_ut_get_node_name(rgn_desc->region.node),
189 rgn_desc->region.length));
190 172
191 return_ACPI_STATUS(AE_AML_REGION_LIMIT); 173 return_ACPI_STATUS(AE_AML_REGION_LIMIT);
192 } 174 }
@@ -270,12 +252,11 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
270 252
271 if (ACPI_FAILURE(status)) { 253 if (ACPI_FAILURE(status)) {
272 if (status == AE_NOT_IMPLEMENTED) { 254 if (status == AE_NOT_IMPLEMENTED) {
273 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 255 ACPI_REPORT_ERROR(("Region %s(%X) not implemented\n",
274 "Region %s(%X) not implemented\n", 256 acpi_ut_get_region_name(rgn_desc->
275 acpi_ut_get_region_name(rgn_desc-> 257 region.
276 region. 258 space_id),
277 space_id), 259 rgn_desc->region.space_id));
278 rgn_desc->region.space_id));
279 } else if (status == AE_NOT_EXIST) { 260 } else if (status == AE_NOT_EXIST) {
280 ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n", 261 ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n",
281 acpi_ut_get_region_name(rgn_desc-> 262 acpi_ut_get_region_name(rgn_desc->
@@ -618,11 +599,10 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
618 599
619 default: 600 default:
620 601
621 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 602 ACPI_REPORT_ERROR(("Unknown update_rule value: %X\n",
622 "write_with_update_rule: Unknown update_rule setting: %X\n", 603 (obj_desc->common_field.
623 (obj_desc->common_field. 604 field_flags &
624 field_flags & 605 AML_FIELD_UPDATE_RULE_MASK)));
625 AML_FIELD_UPDATE_RULE_MASK)));
626 return_ACPI_STATUS(AE_AML_OPERAND_VALUE); 606 return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
627 } 607 }
628 } 608 }
@@ -677,10 +657,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
677 657
678 if (buffer_length < 658 if (buffer_length <
679 ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { 659 ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) {
680 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 660 ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length));
681 "Field size %X (bits) is too large for buffer (%X)\n",
682 obj_desc->common_field.bit_length,
683 buffer_length));
684 661
685 return_ACPI_STATUS(AE_BUFFER_OVERFLOW); 662 return_ACPI_STATUS(AE_BUFFER_OVERFLOW);
686 } 663 }
@@ -792,10 +769,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
792 769
793 if (buffer_length < 770 if (buffer_length <
794 ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { 771 ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) {
795 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 772 ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length));
796 "Field size %X (bits) is too large for buffer (%X)\n",
797 obj_desc->common_field.bit_length,
798 buffer_length));
799 773
800 return_ACPI_STATUS(AE_BUFFER_OVERFLOW); 774 return_ACPI_STATUS(AE_BUFFER_OVERFLOW);
801 } 775 }