diff options
Diffstat (limited to 'drivers/acpi/hardware')
-rw-r--r-- | drivers/acpi/hardware/hwacpi.c | 14 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwregs.c | 43 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwsleep.c | 21 |
3 files changed, 44 insertions, 34 deletions
diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c index 5c068cc4f674..ea2f13271ff1 100644 --- a/drivers/acpi/hardware/hwacpi.c +++ b/drivers/acpi/hardware/hwacpi.c | |||
@@ -68,7 +68,7 @@ acpi_status acpi_hw_initialize(void) | |||
68 | /* We must have the ACPI tables by the time we get here */ | 68 | /* We must have the ACPI tables by the time we get here */ |
69 | 69 | ||
70 | if (!acpi_gbl_FADT) { | 70 | if (!acpi_gbl_FADT) { |
71 | ACPI_REPORT_ERROR(("No FADT is present\n")); | 71 | ACPI_ERROR((AE_INFO, "No FADT is present")); |
72 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 72 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
73 | } | 73 | } |
74 | 74 | ||
@@ -107,7 +107,8 @@ acpi_status acpi_hw_set_mode(u32 mode) | |||
107 | * system does not support mode transition. | 107 | * system does not support mode transition. |
108 | */ | 108 | */ |
109 | if (!acpi_gbl_FADT->smi_cmd) { | 109 | if (!acpi_gbl_FADT->smi_cmd) { |
110 | ACPI_REPORT_ERROR(("No SMI_CMD in FADT, mode transition failed\n")); | 110 | ACPI_ERROR((AE_INFO, |
111 | "No SMI_CMD in FADT, mode transition failed")); | ||
111 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); | 112 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); |
112 | } | 113 | } |
113 | 114 | ||
@@ -119,7 +120,8 @@ acpi_status acpi_hw_set_mode(u32 mode) | |||
119 | * transitions are not supported. | 120 | * transitions are not supported. |
120 | */ | 121 | */ |
121 | if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) { | 122 | if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) { |
122 | ACPI_REPORT_ERROR(("No ACPI mode transition supported in this system (enable/disable both zero)\n")); | 123 | ACPI_ERROR((AE_INFO, |
124 | "No ACPI mode transition supported in this system (enable/disable both zero)")); | ||
123 | return_ACPI_STATUS(AE_OK); | 125 | return_ACPI_STATUS(AE_OK); |
124 | } | 126 | } |
125 | 127 | ||
@@ -153,8 +155,8 @@ acpi_status acpi_hw_set_mode(u32 mode) | |||
153 | } | 155 | } |
154 | 156 | ||
155 | if (ACPI_FAILURE(status)) { | 157 | if (ACPI_FAILURE(status)) { |
156 | ACPI_REPORT_ERROR(("Could not write mode change, %s\n", | 158 | ACPI_EXCEPTION((AE_INFO, status, |
157 | acpi_format_exception(status))); | 159 | "Could not write ACPI mode change")); |
158 | return_ACPI_STATUS(status); | 160 | return_ACPI_STATUS(status); |
159 | } | 161 | } |
160 | 162 | ||
@@ -174,7 +176,7 @@ acpi_status acpi_hw_set_mode(u32 mode) | |||
174 | retry--; | 176 | retry--; |
175 | } | 177 | } |
176 | 178 | ||
177 | ACPI_REPORT_ERROR(("Hardware never changed modes\n")); | 179 | ACPI_ERROR((AE_INFO, "Hardware did not change modes")); |
178 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); | 180 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); |
179 | } | 181 | } |
180 | 182 | ||
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c index b4b50a3d1705..e1fe75498415 100644 --- a/drivers/acpi/hardware/hwregs.c +++ b/drivers/acpi/hardware/hwregs.c | |||
@@ -160,15 +160,16 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) | |||
160 | /* Must have a return object */ | 160 | /* Must have a return object */ |
161 | 161 | ||
162 | if (!info.return_object) { | 162 | if (!info.return_object) { |
163 | ACPI_REPORT_ERROR(("No Sleep State object returned from [%s]\n", | 163 | ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]", |
164 | sleep_state_name)); | 164 | sleep_state_name)); |
165 | status = AE_NOT_EXIST; | 165 | status = AE_NOT_EXIST; |
166 | } | 166 | } |
167 | 167 | ||
168 | /* It must be of type Package */ | 168 | /* It must be of type Package */ |
169 | 169 | ||
170 | else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) { | 170 | else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) { |
171 | ACPI_REPORT_ERROR(("Sleep State return object is not a Package\n")); | 171 | ACPI_ERROR((AE_INFO, |
172 | "Sleep State return object is not a Package")); | ||
172 | status = AE_AML_OPERAND_TYPE; | 173 | status = AE_AML_OPERAND_TYPE; |
173 | } | 174 | } |
174 | 175 | ||
@@ -180,7 +181,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) | |||
180 | * one per sleep type (A/B). | 181 | * one per sleep type (A/B). |
181 | */ | 182 | */ |
182 | else if (info.return_object->package.count < 2) { | 183 | else if (info.return_object->package.count < 2) { |
183 | ACPI_REPORT_ERROR(("Sleep State return package does not have at least two elements\n")); | 184 | ACPI_ERROR((AE_INFO, |
185 | "Sleep State return package does not have at least two elements")); | ||
184 | status = AE_AML_NO_OPERAND; | 186 | status = AE_AML_NO_OPERAND; |
185 | } | 187 | } |
186 | 188 | ||
@@ -190,7 +192,12 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) | |||
190 | != ACPI_TYPE_INTEGER) || | 192 | != ACPI_TYPE_INTEGER) || |
191 | (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1]) | 193 | (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1]) |
192 | != ACPI_TYPE_INTEGER)) { | 194 | != ACPI_TYPE_INTEGER)) { |
193 | ACPI_REPORT_ERROR(("Sleep State return package elements are not both Integers (%s, %s)\n", acpi_ut_get_object_type_name(info.return_object->package.elements[0]), acpi_ut_get_object_type_name(info.return_object->package.elements[1]))); | 195 | ACPI_ERROR((AE_INFO, |
196 | "Sleep State return package elements are not both Integers (%s, %s)", | ||
197 | acpi_ut_get_object_type_name(info.return_object-> | ||
198 | package.elements[0]), | ||
199 | acpi_ut_get_object_type_name(info.return_object-> | ||
200 | package.elements[1]))); | ||
194 | status = AE_AML_OPERAND_TYPE; | 201 | status = AE_AML_OPERAND_TYPE; |
195 | } else { | 202 | } else { |
196 | /* Valid _Sx_ package size, type, and value */ | 203 | /* Valid _Sx_ package size, type, and value */ |
@@ -202,7 +209,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) | |||
202 | } | 209 | } |
203 | 210 | ||
204 | if (ACPI_FAILURE(status)) { | 211 | if (ACPI_FAILURE(status)) { |
205 | ACPI_REPORT_ERROR(("%s While evaluating sleep_state [%s], bad Sleep object %p type %s\n", acpi_format_exception(status), sleep_state_name, info.return_object, acpi_ut_get_object_type_name(info.return_object))); | 212 | ACPI_EXCEPTION((AE_INFO, status, |
213 | "While evaluating sleep_state [%s], bad Sleep object %p type %s", | ||
214 | sleep_state_name, info.return_object, | ||
215 | acpi_ut_get_object_type_name(info. | ||
216 | return_object))); | ||
206 | } | 217 | } |
207 | 218 | ||
208 | acpi_ut_remove_reference(info.return_object); | 219 | acpi_ut_remove_reference(info.return_object); |
@@ -228,8 +239,8 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) | |||
228 | ACPI_FUNCTION_ENTRY(); | 239 | ACPI_FUNCTION_ENTRY(); |
229 | 240 | ||
230 | if (register_id > ACPI_BITREG_MAX) { | 241 | if (register_id > ACPI_BITREG_MAX) { |
231 | ACPI_REPORT_ERROR(("Invalid bit_register ID: %X\n", | 242 | ACPI_ERROR((AE_INFO, "Invalid bit_register ID: %X", |
232 | register_id)); | 243 | register_id)); |
233 | return (NULL); | 244 | return (NULL); |
234 | } | 245 | } |
235 | 246 | ||
@@ -329,8 +340,8 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) | |||
329 | 340 | ||
330 | bit_reg_info = acpi_hw_get_bit_register_info(register_id); | 341 | bit_reg_info = acpi_hw_get_bit_register_info(register_id); |
331 | if (!bit_reg_info) { | 342 | if (!bit_reg_info) { |
332 | ACPI_REPORT_ERROR(("Bad ACPI HW register_id: %X\n", | 343 | ACPI_ERROR((AE_INFO, "Bad ACPI HW register_id: %X", |
333 | register_id)); | 344 | register_id)); |
334 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 345 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
335 | } | 346 | } |
336 | 347 | ||
@@ -564,7 +575,7 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) | |||
564 | break; | 575 | break; |
565 | 576 | ||
566 | default: | 577 | default: |
567 | ACPI_REPORT_ERROR(("Unknown Register ID: %X\n", register_id)); | 578 | ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id)); |
568 | status = AE_BAD_PARAMETER; | 579 | status = AE_BAD_PARAMETER; |
569 | break; | 580 | break; |
570 | } | 581 | } |
@@ -759,8 +770,9 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg) | |||
759 | break; | 770 | break; |
760 | 771 | ||
761 | default: | 772 | default: |
762 | ACPI_REPORT_ERROR(("Unsupported address space: %X\n", | 773 | ACPI_ERROR((AE_INFO, |
763 | reg->address_space_id)); | 774 | "Unsupported address space: %X", |
775 | reg->address_space_id)); | ||
764 | return (AE_BAD_PARAMETER); | 776 | return (AE_BAD_PARAMETER); |
765 | } | 777 | } |
766 | 778 | ||
@@ -829,8 +841,9 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg) | |||
829 | break; | 841 | break; |
830 | 842 | ||
831 | default: | 843 | default: |
832 | ACPI_REPORT_ERROR(("Unsupported address space: %X\n", | 844 | ACPI_ERROR((AE_INFO, |
833 | reg->address_space_id)); | 845 | "Unsupported address space: %X", |
846 | reg->address_space_id)); | ||
834 | return (AE_BAD_PARAMETER); | 847 | return (AE_BAD_PARAMETER); |
835 | } | 848 | } |
836 | 849 | ||
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 992128d71117..89269272fd62 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -199,8 +199,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
199 | 199 | ||
200 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); | 200 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); |
201 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 201 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
202 | ACPI_REPORT_ERROR(("Method _SST failed, %s\n", | 202 | ACPI_EXCEPTION((AE_INFO, status, |
203 | acpi_format_exception(status))); | 203 | "While executing method _SST")); |
204 | } | 204 | } |
205 | 205 | ||
206 | return_ACPI_STATUS(AE_OK); | 206 | return_ACPI_STATUS(AE_OK); |
@@ -232,9 +232,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) | |||
232 | 232 | ||
233 | if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || | 233 | if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || |
234 | (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) { | 234 | (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) { |
235 | ACPI_REPORT_ERROR(("Sleep values out of range: A=%X B=%X\n", | 235 | ACPI_ERROR((AE_INFO, "Sleep values out of range: A=%X B=%X", |
236 | acpi_gbl_sleep_type_a, | 236 | acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b)); |
237 | acpi_gbl_sleep_type_b)); | ||
238 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 237 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
239 | } | 238 | } |
240 | 239 | ||
@@ -533,21 +532,18 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
533 | arg.integer.value = ACPI_SST_WAKING; | 532 | arg.integer.value = ACPI_SST_WAKING; |
534 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); | 533 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); |
535 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 534 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
536 | ACPI_REPORT_ERROR(("Method _SST failed, %s\n", | 535 | ACPI_EXCEPTION((AE_INFO, status, "During Method _SST")); |
537 | acpi_format_exception(status))); | ||
538 | } | 536 | } |
539 | 537 | ||
540 | arg.integer.value = sleep_state; | 538 | arg.integer.value = sleep_state; |
541 | status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL); | 539 | status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL); |
542 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 540 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
543 | ACPI_REPORT_ERROR(("Method _BFS failed, %s\n", | 541 | ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS")); |
544 | acpi_format_exception(status))); | ||
545 | } | 542 | } |
546 | 543 | ||
547 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); | 544 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); |
548 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 545 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
549 | ACPI_REPORT_ERROR(("Method _WAK failed, %s\n", | 546 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); |
550 | acpi_format_exception(status))); | ||
551 | } | 547 | } |
552 | /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ | 548 | /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ |
553 | 549 | ||
@@ -582,8 +578,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
582 | arg.integer.value = ACPI_SST_WORKING; | 578 | arg.integer.value = ACPI_SST_WORKING; |
583 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); | 579 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); |
584 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 580 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
585 | ACPI_REPORT_ERROR(("Method _SST failed, %s\n", | 581 | ACPI_EXCEPTION((AE_INFO, status, "During Method _SST")); |
586 | acpi_format_exception(status))); | ||
587 | } | 582 | } |
588 | 583 | ||
589 | return_ACPI_STATUS(status); | 584 | return_ACPI_STATUS(status); |