diff options
Diffstat (limited to 'drivers/acpi/executer/exfldio.c')
-rw-r--r-- | drivers/acpi/executer/exfldio.c | 93 |
1 files changed, 43 insertions, 50 deletions
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index ba6e08843c29..bd1af35f7fcf 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_ERROR((AE_INFO, "Needed Region, found type %X (%s)", |
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,28 @@ 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_ERROR((AE_INFO, |
166 | "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", | 165 | "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)", |
167 | acpi_ut_get_node_name(obj_desc-> | 166 | acpi_ut_get_node_name(obj_desc-> |
168 | common_field. | 167 | common_field.node), |
169 | node), | 168 | obj_desc->common_field.access_byte_width, |
170 | obj_desc->common_field. | 169 | acpi_ut_get_node_name(rgn_desc->region. |
171 | access_byte_width, | 170 | node), |
172 | acpi_ut_get_node_name(rgn_desc-> | 171 | rgn_desc->region.length)); |
173 | region.node), | ||
174 | rgn_desc->region.length)); | ||
175 | } | 172 | } |
176 | 173 | ||
177 | /* | 174 | /* |
178 | * Offset rounded up to next multiple of field width | 175 | * Offset rounded up to next multiple of field width |
179 | * exceeds region length, indicate an error | 176 | * exceeds region length, indicate an error |
180 | */ | 177 | */ |
181 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 178 | ACPI_ERROR((AE_INFO, |
182 | "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", | 179 | "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)", |
183 | acpi_ut_get_node_name(obj_desc->common_field. | 180 | acpi_ut_get_node_name(obj_desc->common_field.node), |
184 | node), | 181 | obj_desc->common_field.base_byte_offset, |
185 | obj_desc->common_field.base_byte_offset, | 182 | field_datum_byte_offset, |
186 | field_datum_byte_offset, | 183 | obj_desc->common_field.access_byte_width, |
187 | obj_desc->common_field.access_byte_width, | 184 | acpi_ut_get_node_name(rgn_desc->region.node), |
188 | acpi_ut_get_node_name(rgn_desc->region.node), | 185 | rgn_desc->region.length)); |
189 | rgn_desc->region.length)); | ||
190 | 186 | ||
191 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); | 187 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); |
192 | } | 188 | } |
@@ -270,18 +266,17 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, | |||
270 | 266 | ||
271 | if (ACPI_FAILURE(status)) { | 267 | if (ACPI_FAILURE(status)) { |
272 | if (status == AE_NOT_IMPLEMENTED) { | 268 | if (status == AE_NOT_IMPLEMENTED) { |
273 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 269 | ACPI_ERROR((AE_INFO, |
274 | "Region %s(%X) not implemented\n", | 270 | "Region %s(%X) not implemented", |
275 | acpi_ut_get_region_name(rgn_desc-> | 271 | acpi_ut_get_region_name(rgn_desc->region. |
276 | region. | 272 | space_id), |
277 | space_id), | 273 | rgn_desc->region.space_id)); |
278 | rgn_desc->region.space_id)); | ||
279 | } else if (status == AE_NOT_EXIST) { | 274 | } else if (status == AE_NOT_EXIST) { |
280 | ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n", | 275 | ACPI_ERROR((AE_INFO, |
281 | acpi_ut_get_region_name(rgn_desc-> | 276 | "Region %s(%X) has no handler", |
282 | region. | 277 | acpi_ut_get_region_name(rgn_desc->region. |
283 | space_id), | 278 | space_id), |
284 | rgn_desc->region.space_id)); | 279 | rgn_desc->region.space_id)); |
285 | } | 280 | } |
286 | } | 281 | } |
287 | 282 | ||
@@ -514,8 +509,8 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, | |||
514 | 509 | ||
515 | default: | 510 | default: |
516 | 511 | ||
517 | ACPI_REPORT_ERROR(("Wrong object type in field I/O %X\n", | 512 | ACPI_ERROR((AE_INFO, "Wrong object type in field I/O %X", |
518 | ACPI_GET_OBJECT_TYPE(obj_desc))); | 513 | ACPI_GET_OBJECT_TYPE(obj_desc))); |
519 | status = AE_AML_INTERNAL; | 514 | status = AE_AML_INTERNAL; |
520 | break; | 515 | break; |
521 | } | 516 | } |
@@ -618,11 +613,11 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, | |||
618 | 613 | ||
619 | default: | 614 | default: |
620 | 615 | ||
621 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 616 | ACPI_ERROR((AE_INFO, |
622 | "write_with_update_rule: Unknown update_rule setting: %X\n", | 617 | "Unknown update_rule value: %X", |
623 | (obj_desc->common_field. | 618 | (obj_desc->common_field. |
624 | field_flags & | 619 | field_flags & |
625 | AML_FIELD_UPDATE_RULE_MASK))); | 620 | AML_FIELD_UPDATE_RULE_MASK))); |
626 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 621 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
627 | } | 622 | } |
628 | } | 623 | } |
@@ -677,10 +672,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, | |||
677 | 672 | ||
678 | if (buffer_length < | 673 | if (buffer_length < |
679 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { | 674 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { |
680 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 675 | ACPI_ERROR((AE_INFO, |
681 | "Field size %X (bits) is too large for buffer (%X)\n", | 676 | "Field size %X (bits) is too large for buffer (%X)", |
682 | obj_desc->common_field.bit_length, | 677 | obj_desc->common_field.bit_length, buffer_length)); |
683 | buffer_length)); | ||
684 | 678 | ||
685 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 679 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
686 | } | 680 | } |
@@ -792,10 +786,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
792 | 786 | ||
793 | if (buffer_length < | 787 | if (buffer_length < |
794 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { | 788 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { |
795 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 789 | ACPI_ERROR((AE_INFO, |
796 | "Field size %X (bits) is too large for buffer (%X)\n", | 790 | "Field size %X (bits) is too large for buffer (%X)", |
797 | obj_desc->common_field.bit_length, | 791 | obj_desc->common_field.bit_length, buffer_length)); |
798 | buffer_length)); | ||
799 | 792 | ||
800 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 793 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
801 | } | 794 | } |