diff options
author | Bob Moore <robert.moore@intel.com> | 2006-01-27 16:43:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-01-31 03:25:09 -0500 |
commit | b8e4d89357fc434618a59c1047cac72641191805 (patch) | |
tree | ac97fcc6fdc277c682365900663872c96f2420bd | |
parent | 292dd876ee765c478b27c93cc51e93a558ed58bf (diff) |
[ACPI] ACPICA 20060127
Implemented support in the Resource Manager to allow
unresolved namestring references within resource package
objects for the _PRT method. This support is in addition
to the previously implemented unresolved reference
support within the AML parser. If the interpreter slack
mode is enabled (true on Linux unless acpi=strict),
these unresolved references will be passed through
to the caller as a NULL package entry.
http://bugzilla.kernel.org/show_bug.cgi?id=5741
Implemented and deployed new macros and functions for
error and warning messages across the subsystem. These
macros are simpler and generate less code than their
predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION,
ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_*
macros.
Implemented the acpi_cpu_flags type to simplify host OS
integration of the Acquire/Release Lock OSL interfaces.
Suggested by Steven Rostedt and Andrew Morton.
Fixed a problem where Alias ASL operators are sometimes
not correctly resolved. causing AE_AML_INTERNAL
http://bugzilla.kernel.org/show_bug.cgi?id=5189
http://bugzilla.kernel.org/show_bug.cgi?id=5674
Fixed several problems with the implementation of the
ConcatenateResTemplate ASL operator. As per the ACPI
specification, zero length buffers are now treated as a
single EndTag. One-length buffers always cause a fatal
exception. Non-zero length buffers that do not end with
a full 2-byte EndTag cause a fatal exception.
Fixed a possible structure overwrite in the
AcpiGetObjectInfo external interface. (With assistance
from Thomas Renninger)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
95 files changed, 1345 insertions, 821 deletions
diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index f3a008ff1eae..76bc0463f6de 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c | |||
@@ -128,7 +128,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, | |||
128 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, | 128 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, |
129 | &(node)); | 129 | &(node)); |
130 | if (ACPI_FAILURE(status)) { | 130 | if (ACPI_FAILURE(status)) { |
131 | ACPI_REPORT_NSERROR(arg->common.value.string, status); | 131 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
132 | return_ACPI_STATUS(status); | 132 | return_ACPI_STATUS(status); |
133 | } | 133 | } |
134 | } | 134 | } |
@@ -232,7 +232,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, | |||
232 | + (acpi_integer) arg->common.value.size; | 232 | + (acpi_integer) arg->common.value.size; |
233 | 233 | ||
234 | if (position > ACPI_UINT32_MAX) { | 234 | if (position > ACPI_UINT32_MAX) { |
235 | ACPI_REPORT_ERROR(("Bit offset within field too large (> 0xFFFFFFFF)\n")); | 235 | ACPI_ERROR((AE_INFO, |
236 | "Bit offset within field too large (> 0xFFFFFFFF)")); | ||
236 | return_ACPI_STATUS(AE_SUPPORT); | 237 | return_ACPI_STATUS(AE_SUPPORT); |
237 | } | 238 | } |
238 | 239 | ||
@@ -268,8 +269,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, | |||
268 | ACPI_NS_DONT_OPEN_SCOPE, | 269 | ACPI_NS_DONT_OPEN_SCOPE, |
269 | walk_state, &info->field_node); | 270 | walk_state, &info->field_node); |
270 | if (ACPI_FAILURE(status)) { | 271 | if (ACPI_FAILURE(status)) { |
271 | ACPI_REPORT_NSERROR((char *)&arg->named.name, | 272 | ACPI_ERROR_NAMESPACE((char *)&arg->named.name, |
272 | status); | 273 | status); |
273 | if (status != AE_ALREADY_EXISTS) { | 274 | if (status != AE_ALREADY_EXISTS) { |
274 | return_ACPI_STATUS(status); | 275 | return_ACPI_STATUS(status); |
275 | } | 276 | } |
@@ -293,7 +294,11 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, | |||
293 | + (acpi_integer) arg->common.value.size; | 294 | + (acpi_integer) arg->common.value.size; |
294 | 295 | ||
295 | if (position > ACPI_UINT32_MAX) { | 296 | if (position > ACPI_UINT32_MAX) { |
296 | ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", ACPI_CAST_PTR(char, &info->field_node->name))); | 297 | ACPI_ERROR((AE_INFO, |
298 | "Field [%4.4s] bit offset too large (> 0xFFFFFFFF)", | ||
299 | ACPI_CAST_PTR(char, | ||
300 | &info->field_node-> | ||
301 | name))); | ||
297 | return_ACPI_STATUS(AE_SUPPORT); | 302 | return_ACPI_STATUS(AE_SUPPORT); |
298 | } | 303 | } |
299 | 304 | ||
@@ -302,8 +307,9 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, | |||
302 | 307 | ||
303 | default: | 308 | default: |
304 | 309 | ||
305 | ACPI_REPORT_ERROR(("Invalid opcode in field list: %X\n", | 310 | ACPI_ERROR((AE_INFO, |
306 | arg->common.aml_opcode)); | 311 | "Invalid opcode in field list: %X", |
312 | arg->common.aml_opcode)); | ||
307 | return_ACPI_STATUS(AE_AML_BAD_OPCODE); | 313 | return_ACPI_STATUS(AE_AML_BAD_OPCODE); |
308 | } | 314 | } |
309 | 315 | ||
@@ -348,7 +354,7 @@ acpi_ds_create_field(union acpi_parse_object *op, | |||
348 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, | 354 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, |
349 | walk_state, ®ion_node); | 355 | walk_state, ®ion_node); |
350 | if (ACPI_FAILURE(status)) { | 356 | if (ACPI_FAILURE(status)) { |
351 | ACPI_REPORT_NSERROR(arg->common.value.name, status); | 357 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); |
352 | return_ACPI_STATUS(status); | 358 | return_ACPI_STATUS(status); |
353 | } | 359 | } |
354 | } | 360 | } |
@@ -430,8 +436,8 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, | |||
430 | ACPI_NS_ERROR_IF_FOUND, | 436 | ACPI_NS_ERROR_IF_FOUND, |
431 | walk_state, &node); | 437 | walk_state, &node); |
432 | if (ACPI_FAILURE(status)) { | 438 | if (ACPI_FAILURE(status)) { |
433 | ACPI_REPORT_NSERROR((char *)&arg->named.name, | 439 | ACPI_ERROR_NAMESPACE((char *)&arg->named.name, |
434 | status); | 440 | status); |
435 | if (status != AE_ALREADY_EXISTS) { | 441 | if (status != AE_ALREADY_EXISTS) { |
436 | return_ACPI_STATUS(status); | 442 | return_ACPI_STATUS(status); |
437 | } | 443 | } |
@@ -487,7 +493,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, | |||
487 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, | 493 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, |
488 | walk_state, ®ion_node); | 494 | walk_state, ®ion_node); |
489 | if (ACPI_FAILURE(status)) { | 495 | if (ACPI_FAILURE(status)) { |
490 | ACPI_REPORT_NSERROR(arg->common.value.name, status); | 496 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); |
491 | return_ACPI_STATUS(status); | 497 | return_ACPI_STATUS(status); |
492 | } | 498 | } |
493 | } | 499 | } |
@@ -501,7 +507,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, | |||
501 | ACPI_NS_SEARCH_PARENT, walk_state, | 507 | ACPI_NS_SEARCH_PARENT, walk_state, |
502 | &info.register_node); | 508 | &info.register_node); |
503 | if (ACPI_FAILURE(status)) { | 509 | if (ACPI_FAILURE(status)) { |
504 | ACPI_REPORT_NSERROR(arg->common.value.string, status); | 510 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
505 | return_ACPI_STATUS(status); | 511 | return_ACPI_STATUS(status); |
506 | } | 512 | } |
507 | 513 | ||
@@ -559,7 +565,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op, | |||
559 | ACPI_NS_SEARCH_PARENT, walk_state, | 565 | ACPI_NS_SEARCH_PARENT, walk_state, |
560 | &info.register_node); | 566 | &info.register_node); |
561 | if (ACPI_FAILURE(status)) { | 567 | if (ACPI_FAILURE(status)) { |
562 | ACPI_REPORT_NSERROR(arg->common.value.string, status); | 568 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
563 | return_ACPI_STATUS(status); | 569 | return_ACPI_STATUS(status); |
564 | } | 570 | } |
565 | 571 | ||
@@ -572,7 +578,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op, | |||
572 | ACPI_NS_SEARCH_PARENT, walk_state, | 578 | ACPI_NS_SEARCH_PARENT, walk_state, |
573 | &info.data_register_node); | 579 | &info.data_register_node); |
574 | if (ACPI_FAILURE(status)) { | 580 | if (ACPI_FAILURE(status)) { |
575 | ACPI_REPORT_NSERROR(arg->common.value.string, status); | 581 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
576 | return_ACPI_STATUS(status); | 582 | return_ACPI_STATUS(status); |
577 | } | 583 | } |
578 | 584 | ||
diff --git a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c index 258fbdfaa69c..e65a07ad2422 100644 --- a/drivers/acpi/dispatcher/dsinit.c +++ b/drivers/acpi/dispatcher/dsinit.c | |||
@@ -105,7 +105,10 @@ acpi_ds_init_one_object(acpi_handle obj_handle, | |||
105 | 105 | ||
106 | status = acpi_ds_initialize_region(obj_handle); | 106 | status = acpi_ds_initialize_region(obj_handle); |
107 | if (ACPI_FAILURE(status)) { | 107 | if (ACPI_FAILURE(status)) { |
108 | ACPI_REPORT_ERROR(("Region %p [%4.4s] - Init failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status))); | 108 | ACPI_EXCEPTION((AE_INFO, status, |
109 | "During Region initialization %p [%4.4s]", | ||
110 | obj_handle, | ||
111 | acpi_ut_get_node_name(obj_handle))); | ||
109 | } | 112 | } |
110 | 113 | ||
111 | info->op_region_count++; | 114 | info->op_region_count++; |
@@ -144,7 +147,11 @@ acpi_ds_init_one_object(acpi_handle obj_handle, | |||
144 | */ | 147 | */ |
145 | status = acpi_ds_parse_method(obj_handle); | 148 | status = acpi_ds_parse_method(obj_handle); |
146 | if (ACPI_FAILURE(status)) { | 149 | if (ACPI_FAILURE(status)) { |
147 | ACPI_REPORT_ERROR(("\n+Method %p [%4.4s] - parse failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status))); | 150 | ACPI_ERROR((AE_INFO, |
151 | "Method %p [%4.4s] - parse failure, %s", | ||
152 | obj_handle, | ||
153 | acpi_ut_get_node_name(obj_handle), | ||
154 | acpi_format_exception(status))); | ||
148 | 155 | ||
149 | /* This parse failed, but we will continue parsing more methods */ | 156 | /* This parse failed, but we will continue parsing more methods */ |
150 | } | 157 | } |
@@ -206,8 +213,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc, | |||
206 | status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, | 213 | status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, |
207 | acpi_ds_init_one_object, &info, NULL); | 214 | acpi_ds_init_one_object, &info, NULL); |
208 | if (ACPI_FAILURE(status)) { | 215 | if (ACPI_FAILURE(status)) { |
209 | ACPI_REPORT_ERROR(("walk_namespace failed, %s\n", | 216 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); |
210 | acpi_format_exception(status))); | ||
211 | } | 217 | } |
212 | 218 | ||
213 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 219 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index d861add3fc1f..c475546535b6 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
@@ -141,7 +141,8 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node, | |||
141 | /* Prevent wraparound of thread count */ | 141 | /* Prevent wraparound of thread count */ |
142 | 142 | ||
143 | if (obj_desc->method.thread_count == ACPI_UINT8_MAX) { | 143 | if (obj_desc->method.thread_count == ACPI_UINT8_MAX) { |
144 | ACPI_REPORT_ERROR(("Method reached maximum reentrancy limit (255)\n")); | 144 | ACPI_ERROR((AE_INFO, |
145 | "Method reached maximum reentrancy limit (255)")); | ||
145 | return_ACPI_STATUS(AE_AML_METHOD_LIMIT); | 146 | return_ACPI_STATUS(AE_AML_METHOD_LIMIT); |
146 | } | 147 | } |
147 | 148 | ||
@@ -470,7 +471,8 @@ void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state) | |||
470 | acpi_os_signal_semaphore(walk_state->method_desc->method. | 471 | acpi_os_signal_semaphore(walk_state->method_desc->method. |
471 | semaphore, 1); | 472 | semaphore, 1); |
472 | if (ACPI_FAILURE(status)) { | 473 | if (ACPI_FAILURE(status)) { |
473 | ACPI_REPORT_ERROR(("Could not signal method semaphore\n")); | 474 | ACPI_ERROR((AE_INFO, |
475 | "Could not signal method semaphore")); | ||
474 | 476 | ||
475 | /* Ignore error and continue cleanup */ | 477 | /* Ignore error and continue cleanup */ |
476 | } | 478 | } |
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index ce33c34f87c6..c025674f938b 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c | |||
@@ -260,7 +260,9 @@ acpi_ds_method_data_get_node(u16 opcode, | |||
260 | case AML_LOCAL_OP: | 260 | case AML_LOCAL_OP: |
261 | 261 | ||
262 | if (index > ACPI_METHOD_MAX_LOCAL) { | 262 | if (index > ACPI_METHOD_MAX_LOCAL) { |
263 | ACPI_REPORT_ERROR(("Local index %d is invalid (max %d)\n", index, ACPI_METHOD_MAX_LOCAL)); | 263 | ACPI_ERROR((AE_INFO, |
264 | "Local index %d is invalid (max %d)", | ||
265 | index, ACPI_METHOD_MAX_LOCAL)); | ||
264 | return_ACPI_STATUS(AE_AML_INVALID_INDEX); | 266 | return_ACPI_STATUS(AE_AML_INVALID_INDEX); |
265 | } | 267 | } |
266 | 268 | ||
@@ -272,8 +274,9 @@ acpi_ds_method_data_get_node(u16 opcode, | |||
272 | case AML_ARG_OP: | 274 | case AML_ARG_OP: |
273 | 275 | ||
274 | if (index > ACPI_METHOD_MAX_ARG) { | 276 | if (index > ACPI_METHOD_MAX_ARG) { |
275 | ACPI_REPORT_ERROR(("Arg index %d is invalid (max %d)\n", | 277 | ACPI_ERROR((AE_INFO, |
276 | index, ACPI_METHOD_MAX_ARG)); | 278 | "Arg index %d is invalid (max %d)", |
279 | index, ACPI_METHOD_MAX_ARG)); | ||
277 | return_ACPI_STATUS(AE_AML_INVALID_INDEX); | 280 | return_ACPI_STATUS(AE_AML_INVALID_INDEX); |
278 | } | 281 | } |
279 | 282 | ||
@@ -283,7 +286,7 @@ acpi_ds_method_data_get_node(u16 opcode, | |||
283 | break; | 286 | break; |
284 | 287 | ||
285 | default: | 288 | default: |
286 | ACPI_REPORT_ERROR(("Opcode %d is invalid\n", opcode)); | 289 | ACPI_ERROR((AE_INFO, "Opcode %d is invalid", opcode)); |
287 | return_ACPI_STATUS(AE_AML_BAD_OPCODE); | 290 | return_ACPI_STATUS(AE_AML_BAD_OPCODE); |
288 | } | 291 | } |
289 | 292 | ||
@@ -374,7 +377,7 @@ acpi_ds_method_data_get_value(u16 opcode, | |||
374 | /* Validate the object descriptor */ | 377 | /* Validate the object descriptor */ |
375 | 378 | ||
376 | if (!dest_desc) { | 379 | if (!dest_desc) { |
377 | ACPI_REPORT_ERROR(("Null object descriptor pointer\n")); | 380 | ACPI_ERROR((AE_INFO, "Null object descriptor pointer")); |
378 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 381 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
379 | } | 382 | } |
380 | 383 | ||
@@ -419,18 +422,24 @@ acpi_ds_method_data_get_value(u16 opcode, | |||
419 | switch (opcode) { | 422 | switch (opcode) { |
420 | case AML_ARG_OP: | 423 | case AML_ARG_OP: |
421 | 424 | ||
422 | ACPI_REPORT_ERROR(("Uninitialized Arg[%d] at node %p\n", index, node)); | 425 | ACPI_ERROR((AE_INFO, |
426 | "Uninitialized Arg[%d] at node %p", | ||
427 | index, node)); | ||
423 | 428 | ||
424 | return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG); | 429 | return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG); |
425 | 430 | ||
426 | case AML_LOCAL_OP: | 431 | case AML_LOCAL_OP: |
427 | 432 | ||
428 | ACPI_REPORT_ERROR(("Uninitialized Local[%d] at node %p\n", index, node)); | 433 | ACPI_ERROR((AE_INFO, |
434 | "Uninitialized Local[%d] at node %p", | ||
435 | index, node)); | ||
429 | 436 | ||
430 | return_ACPI_STATUS(AE_AML_UNINITIALIZED_LOCAL); | 437 | return_ACPI_STATUS(AE_AML_UNINITIALIZED_LOCAL); |
431 | 438 | ||
432 | default: | 439 | default: |
433 | ACPI_REPORT_ERROR(("Not a Arg/Local opcode: %X\n", opcode)); | 440 | ACPI_ERROR((AE_INFO, |
441 | "Not a Arg/Local opcode: %X", | ||
442 | opcode)); | ||
434 | return_ACPI_STATUS(AE_AML_INTERNAL); | 443 | return_ACPI_STATUS(AE_AML_INTERNAL); |
435 | } | 444 | } |
436 | } | 445 | } |
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index dc116d679a58..8b21f0f9e517 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c | |||
@@ -129,8 +129,8 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, | |||
129 | 129 | ||
130 | return_ACPI_STATUS(AE_OK); | 130 | return_ACPI_STATUS(AE_OK); |
131 | } else { | 131 | } else { |
132 | ACPI_REPORT_NSERROR(op->common.value. | 132 | ACPI_ERROR_NAMESPACE(op->common.value. |
133 | string, status); | 133 | string, status); |
134 | } | 134 | } |
135 | 135 | ||
136 | return_ACPI_STATUS(status); | 136 | return_ACPI_STATUS(status); |
@@ -214,7 +214,9 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, | |||
214 | byte_list = arg->named.next; | 214 | byte_list = arg->named.next; |
215 | if (byte_list) { | 215 | if (byte_list) { |
216 | if (byte_list->common.aml_opcode != AML_INT_BYTELIST_OP) { | 216 | if (byte_list->common.aml_opcode != AML_INT_BYTELIST_OP) { |
217 | ACPI_REPORT_ERROR(("Expecting bytelist, got AML opcode %X in op %p\n", byte_list->common.aml_opcode, byte_list)); | 217 | ACPI_ERROR((AE_INFO, |
218 | "Expecting bytelist, got AML opcode %X in op %p", | ||
219 | byte_list->common.aml_opcode, byte_list)); | ||
218 | 220 | ||
219 | acpi_ut_remove_reference(obj_desc); | 221 | acpi_ut_remove_reference(obj_desc); |
220 | return (AE_TYPE); | 222 | return (AE_TYPE); |
@@ -540,7 +542,9 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, | |||
540 | 542 | ||
541 | default: | 543 | default: |
542 | 544 | ||
543 | ACPI_REPORT_ERROR(("Unknown constant opcode %X\n", opcode)); | 545 | ACPI_ERROR((AE_INFO, |
546 | "Unknown constant opcode %X", | ||
547 | opcode)); | ||
544 | status = AE_AML_OPERAND_TYPE; | 548 | status = AE_AML_OPERAND_TYPE; |
545 | break; | 549 | break; |
546 | } | 550 | } |
@@ -555,8 +559,8 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, | |||
555 | break; | 559 | break; |
556 | 560 | ||
557 | default: | 561 | default: |
558 | ACPI_REPORT_ERROR(("Unknown Integer type %X\n", | 562 | ACPI_ERROR((AE_INFO, "Unknown Integer type %X", |
559 | op_info->type)); | 563 | op_info->type)); |
560 | status = AE_AML_OPERAND_TYPE; | 564 | status = AE_AML_OPERAND_TYPE; |
561 | break; | 565 | break; |
562 | } | 566 | } |
@@ -634,8 +638,8 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, | |||
634 | 638 | ||
635 | default: | 639 | default: |
636 | 640 | ||
637 | ACPI_REPORT_ERROR(("Unimplemented data type: %X\n", | 641 | ACPI_ERROR((AE_INFO, "Unimplemented data type: %X", |
638 | ACPI_GET_OBJECT_TYPE(obj_desc))); | 642 | ACPI_GET_OBJECT_TYPE(obj_desc))); |
639 | 643 | ||
640 | status = AE_AML_OPERAND_TYPE; | 644 | status = AE_AML_OPERAND_TYPE; |
641 | break; | 645 | break; |
diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c index 60414ee84b0a..6229c10674e1 100644 --- a/drivers/acpi/dispatcher/dsopcode.c +++ b/drivers/acpi/dispatcher/dsopcode.c | |||
@@ -245,7 +245,9 @@ acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc) | |||
245 | 245 | ||
246 | node = obj_desc->buffer.node; | 246 | node = obj_desc->buffer.node; |
247 | if (!node) { | 247 | if (!node) { |
248 | ACPI_REPORT_ERROR(("No pointer back to NS node in buffer obj %p\n", obj_desc)); | 248 | ACPI_ERROR((AE_INFO, |
249 | "No pointer back to NS node in buffer obj %p", | ||
250 | obj_desc)); | ||
249 | return_ACPI_STATUS(AE_AML_INTERNAL); | 251 | return_ACPI_STATUS(AE_AML_INTERNAL); |
250 | } | 252 | } |
251 | 253 | ||
@@ -287,8 +289,9 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc) | |||
287 | 289 | ||
288 | node = obj_desc->package.node; | 290 | node = obj_desc->package.node; |
289 | if (!node) { | 291 | if (!node) { |
290 | ACPI_REPORT_ERROR(("No pointer back to NS node in package %p\n", | 292 | ACPI_ERROR((AE_INFO, |
291 | obj_desc)); | 293 | "No pointer back to NS node in package %p", |
294 | obj_desc)); | ||
292 | return_ACPI_STATUS(AE_AML_INTERNAL); | 295 | return_ACPI_STATUS(AE_AML_INTERNAL); |
293 | } | 296 | } |
294 | 297 | ||
@@ -413,7 +416,9 @@ acpi_ds_init_buffer_field(u16 aml_opcode, | |||
413 | /* Host object must be a Buffer */ | 416 | /* Host object must be a Buffer */ |
414 | 417 | ||
415 | if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) { | 418 | if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) { |
416 | ACPI_REPORT_ERROR(("Target of Create Field is not a Buffer object - %s\n", acpi_ut_get_object_type_name(buffer_desc))); | 419 | ACPI_ERROR((AE_INFO, |
420 | "Target of Create Field is not a Buffer object - %s", | ||
421 | acpi_ut_get_object_type_name(buffer_desc))); | ||
417 | 422 | ||
418 | status = AE_AML_OPERAND_TYPE; | 423 | status = AE_AML_OPERAND_TYPE; |
419 | goto cleanup; | 424 | goto cleanup; |
@@ -425,9 +430,10 @@ acpi_ds_init_buffer_field(u16 aml_opcode, | |||
425 | * after resolution in acpi_ex_resolve_operands(). | 430 | * after resolution in acpi_ex_resolve_operands(). |
426 | */ | 431 | */ |
427 | if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) { | 432 | if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) { |
428 | ACPI_REPORT_ERROR(("(%s) destination not a NS Node [%s]\n", | 433 | ACPI_ERROR((AE_INFO, |
429 | acpi_ps_get_opcode_name(aml_opcode), | 434 | "(%s) destination not a NS Node [%s]", |
430 | acpi_ut_get_descriptor_name(result_desc))); | 435 | acpi_ps_get_opcode_name(aml_opcode), |
436 | acpi_ut_get_descriptor_name(result_desc))); | ||
431 | 437 | ||
432 | status = AE_AML_OPERAND_TYPE; | 438 | status = AE_AML_OPERAND_TYPE; |
433 | goto cleanup; | 439 | goto cleanup; |
@@ -450,7 +456,8 @@ acpi_ds_init_buffer_field(u16 aml_opcode, | |||
450 | /* Must have a valid (>0) bit count */ | 456 | /* Must have a valid (>0) bit count */ |
451 | 457 | ||
452 | if (bit_count == 0) { | 458 | if (bit_count == 0) { |
453 | ACPI_REPORT_ERROR(("Attempt to create_field of length 0\n")); | 459 | ACPI_ERROR((AE_INFO, |
460 | "Attempt to create_field of length zero")); | ||
454 | status = AE_AML_OPERAND_VALUE; | 461 | status = AE_AML_OPERAND_VALUE; |
455 | goto cleanup; | 462 | goto cleanup; |
456 | } | 463 | } |
@@ -503,8 +510,8 @@ acpi_ds_init_buffer_field(u16 aml_opcode, | |||
503 | 510 | ||
504 | default: | 511 | default: |
505 | 512 | ||
506 | ACPI_REPORT_ERROR(("Unknown field creation opcode %02x\n", | 513 | ACPI_ERROR((AE_INFO, |
507 | aml_opcode)); | 514 | "Unknown field creation opcode %02x", aml_opcode)); |
508 | status = AE_AML_BAD_OPCODE; | 515 | status = AE_AML_BAD_OPCODE; |
509 | goto cleanup; | 516 | goto cleanup; |
510 | } | 517 | } |
@@ -512,7 +519,12 @@ acpi_ds_init_buffer_field(u16 aml_opcode, | |||
512 | /* Entire field must fit within the current length of the buffer */ | 519 | /* Entire field must fit within the current length of the buffer */ |
513 | 520 | ||
514 | if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) { | 521 | if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) { |
515 | ACPI_REPORT_ERROR(("Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", acpi_ut_get_node_name(result_desc), bit_offset + bit_count, acpi_ut_get_node_name(buffer_desc->buffer.node), 8 * (u32) buffer_desc->buffer.length)); | 522 | ACPI_ERROR((AE_INFO, |
523 | "Field [%4.4s] at %d exceeds Buffer [%4.4s] size %d (bits)", | ||
524 | acpi_ut_get_node_name(result_desc), | ||
525 | bit_offset + bit_count, | ||
526 | acpi_ut_get_node_name(buffer_desc->buffer.node), | ||
527 | 8 * (u32) buffer_desc->buffer.length)); | ||
516 | status = AE_AML_BUFFER_LIMIT; | 528 | status = AE_AML_BUFFER_LIMIT; |
517 | goto cleanup; | 529 | goto cleanup; |
518 | } | 530 | } |
@@ -618,10 +630,9 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state, | |||
618 | "after acpi_ex_resolve_operands"); | 630 | "after acpi_ex_resolve_operands"); |
619 | 631 | ||
620 | if (ACPI_FAILURE(status)) { | 632 | if (ACPI_FAILURE(status)) { |
621 | ACPI_REPORT_ERROR(("(%s) bad operand(s) (%X)\n", | 633 | ACPI_ERROR((AE_INFO, "(%s) bad operand(s) (%X)", |
622 | acpi_ps_get_opcode_name(op->common. | 634 | acpi_ps_get_opcode_name(op->common.aml_opcode), |
623 | aml_opcode), | 635 | status)); |
624 | status)); | ||
625 | 636 | ||
626 | return_ACPI_STATUS(status); | 637 | return_ACPI_STATUS(status); |
627 | } | 638 | } |
@@ -1145,8 +1156,8 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, | |||
1145 | 1156 | ||
1146 | default: | 1157 | default: |
1147 | 1158 | ||
1148 | ACPI_REPORT_ERROR(("Unknown control opcode=%X Op=%p\n", | 1159 | ACPI_ERROR((AE_INFO, "Unknown control opcode=%X Op=%p", |
1149 | op->common.aml_opcode, op)); | 1160 | op->common.aml_opcode, op)); |
1150 | 1161 | ||
1151 | status = AE_AML_BAD_OPCODE; | 1162 | status = AE_AML_BAD_OPCODE; |
1152 | break; | 1163 | break; |
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c index cd9aa7faa57b..53356a591ac1 100644 --- a/drivers/acpi/dispatcher/dsutils.c +++ b/drivers/acpi/dispatcher/dsutils.c | |||
@@ -176,7 +176,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
176 | /* Must have both an Op and a Result Object */ | 176 | /* Must have both an Op and a Result Object */ |
177 | 177 | ||
178 | if (!op) { | 178 | if (!op) { |
179 | ACPI_REPORT_ERROR(("Null Op\n")); | 179 | ACPI_ERROR((AE_INFO, "Null Op")); |
180 | return_UINT8(TRUE); | 180 | return_UINT8(TRUE); |
181 | } | 181 | } |
182 | 182 | ||
@@ -216,7 +216,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
216 | parent_info = | 216 | parent_info = |
217 | acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode); | 217 | acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode); |
218 | if (parent_info->class == AML_CLASS_UNKNOWN) { | 218 | if (parent_info->class == AML_CLASS_UNKNOWN) { |
219 | ACPI_REPORT_ERROR(("Unknown parent opcode Op=%p\n", op)); | 219 | ACPI_ERROR((AE_INFO, "Unknown parent opcode Op=%p", op)); |
220 | return_UINT8(FALSE); | 220 | return_UINT8(FALSE); |
221 | } | 221 | } |
222 | 222 | ||
@@ -343,7 +343,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op, | |||
343 | ACPI_FUNCTION_TRACE_PTR("ds_delete_result_if_not_used", result_obj); | 343 | ACPI_FUNCTION_TRACE_PTR("ds_delete_result_if_not_used", result_obj); |
344 | 344 | ||
345 | if (!op) { | 345 | if (!op) { |
346 | ACPI_REPORT_ERROR(("Null Op\n")); | 346 | ACPI_ERROR((AE_INFO, "Null Op")); |
347 | return_VOID; | 347 | return_VOID; |
348 | } | 348 | } |
349 | 349 | ||
@@ -566,7 +566,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, | |||
566 | } | 566 | } |
567 | 567 | ||
568 | if (ACPI_FAILURE(status)) { | 568 | if (ACPI_FAILURE(status)) { |
569 | ACPI_REPORT_NSERROR(name_string, status); | 569 | ACPI_ERROR_NAMESPACE(name_string, status); |
570 | } | 570 | } |
571 | } | 571 | } |
572 | 572 | ||
@@ -634,7 +634,8 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, | |||
634 | * Only error is underflow, and this indicates | 634 | * Only error is underflow, and this indicates |
635 | * a missing or null operand! | 635 | * a missing or null operand! |
636 | */ | 636 | */ |
637 | ACPI_REPORT_ERROR(("Missing or null operand, %s\n", acpi_format_exception(status))); | 637 | ACPI_EXCEPTION((AE_INFO, status, |
638 | "Missing or null operand")); | ||
638 | return_ACPI_STATUS(status); | 639 | return_ACPI_STATUS(status); |
639 | } | 640 | } |
640 | } else { | 641 | } else { |
@@ -726,7 +727,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state, | |||
726 | */ | 727 | */ |
727 | (void)acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state); | 728 | (void)acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state); |
728 | 729 | ||
729 | ACPI_REPORT_ERROR(("While creating Arg %d - %s\n", | 730 | ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %d", |
730 | (arg_count + 1), acpi_format_exception(status))); | 731 | (arg_count + 1))); |
731 | return_ACPI_STATUS(status); | 732 | return_ACPI_STATUS(status); |
732 | } | 733 | } |
diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c index 5a9b91fe93d2..f1af655ff113 100644 --- a/drivers/acpi/dispatcher/dswexec.c +++ b/drivers/acpi/dispatcher/dswexec.c | |||
@@ -100,7 +100,8 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, | |||
100 | if (result_obj) { | 100 | if (result_obj) { |
101 | status = acpi_ds_result_pop(&obj_desc, walk_state); | 101 | status = acpi_ds_result_pop(&obj_desc, walk_state); |
102 | if (ACPI_FAILURE(status)) { | 102 | if (ACPI_FAILURE(status)) { |
103 | ACPI_REPORT_ERROR(("Could not get result from predicate evaluation, %s\n", acpi_format_exception(status))); | 103 | ACPI_EXCEPTION((AE_INFO, status, |
104 | "Could not get result from predicate evaluation")); | ||
104 | 105 | ||
105 | return_ACPI_STATUS(status); | 106 | return_ACPI_STATUS(status); |
106 | } | 107 | } |
@@ -121,8 +122,9 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, | |||
121 | } | 122 | } |
122 | 123 | ||
123 | if (!obj_desc) { | 124 | if (!obj_desc) { |
124 | ACPI_REPORT_ERROR(("No predicate obj_desc=%p State=%p\n", | 125 | ACPI_ERROR((AE_INFO, |
125 | obj_desc, walk_state)); | 126 | "No predicate obj_desc=%p State=%p", |
127 | obj_desc, walk_state)); | ||
126 | 128 | ||
127 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 129 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
128 | } | 130 | } |
@@ -137,7 +139,10 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, | |||
137 | } | 139 | } |
138 | 140 | ||
139 | if (ACPI_GET_OBJECT_TYPE(local_obj_desc) != ACPI_TYPE_INTEGER) { | 141 | if (ACPI_GET_OBJECT_TYPE(local_obj_desc) != ACPI_TYPE_INTEGER) { |
140 | ACPI_REPORT_ERROR(("Bad predicate (not an integer) obj_desc=%p State=%p Type=%X\n", obj_desc, walk_state, ACPI_GET_OBJECT_TYPE(obj_desc))); | 142 | ACPI_ERROR((AE_INFO, |
143 | "Bad predicate (not an integer) obj_desc=%p State=%p Type=%X", | ||
144 | obj_desc, walk_state, | ||
145 | ACPI_GET_OBJECT_TYPE(obj_desc))); | ||
141 | 146 | ||
142 | status = AE_AML_OPERAND_TYPE; | 147 | status = AE_AML_OPERAND_TYPE; |
143 | goto cleanup; | 148 | goto cleanup; |
@@ -356,8 +361,8 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) | |||
356 | op_class = walk_state->op_info->class; | 361 | op_class = walk_state->op_info->class; |
357 | 362 | ||
358 | if (op_class == AML_CLASS_UNKNOWN) { | 363 | if (op_class == AML_CLASS_UNKNOWN) { |
359 | ACPI_REPORT_ERROR(("Unknown opcode %X\n", | 364 | ACPI_ERROR((AE_INFO, "Unknown opcode %X", |
360 | op->common.aml_opcode)); | 365 | op->common.aml_opcode)); |
361 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); | 366 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); |
362 | } | 367 | } |
363 | 368 | ||
@@ -447,7 +452,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) | |||
447 | walk_state->operands[1]->reference.offset)) { | 452 | walk_state->operands[1]->reference.offset)) { |
448 | status = AE_OK; | 453 | status = AE_OK; |
449 | } else { | 454 | } else { |
450 | ACPI_REPORT_ERROR(("[%s]: Could not resolve operands, %s\n", acpi_ps_get_opcode_name(walk_state->opcode), acpi_format_exception(status))); | 455 | ACPI_EXCEPTION((AE_INFO, status, |
456 | "While resolving operands for [%s]", | ||
457 | acpi_ps_get_opcode_name | ||
458 | (walk_state->opcode))); | ||
451 | } | 459 | } |
452 | } | 460 | } |
453 | 461 | ||
@@ -666,8 +674,8 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) | |||
666 | 674 | ||
667 | case AML_TYPE_UNDEFINED: | 675 | case AML_TYPE_UNDEFINED: |
668 | 676 | ||
669 | ACPI_REPORT_ERROR(("Undefined opcode type Op=%p\n", | 677 | ACPI_ERROR((AE_INFO, |
670 | op)); | 678 | "Undefined opcode type Op=%p", op)); |
671 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); | 679 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); |
672 | 680 | ||
673 | case AML_TYPE_BOGUS: | 681 | case AML_TYPE_BOGUS: |
@@ -679,7 +687,10 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) | |||
679 | 687 | ||
680 | default: | 688 | default: |
681 | 689 | ||
682 | ACPI_REPORT_ERROR(("Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p\n", op_class, op_type, op->common.aml_opcode, op)); | 690 | ACPI_ERROR((AE_INFO, |
691 | "Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p", | ||
692 | op_class, op_type, op->common.aml_opcode, | ||
693 | op)); | ||
683 | 694 | ||
684 | status = AE_NOT_IMPLEMENTED; | 695 | status = AE_NOT_IMPLEMENTED; |
685 | break; | 696 | break; |
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c index 4cad6afa82f7..d3d24da31c81 100644 --- a/drivers/acpi/dispatcher/dswload.c +++ b/drivers/acpi/dispatcher/dswload.c | |||
@@ -187,7 +187,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, | |||
187 | } | 187 | } |
188 | #endif | 188 | #endif |
189 | if (ACPI_FAILURE(status)) { | 189 | if (ACPI_FAILURE(status)) { |
190 | ACPI_REPORT_NSERROR(path, status); | 190 | ACPI_ERROR_NAMESPACE(path, status); |
191 | return_ACPI_STATUS(status); | 191 | return_ACPI_STATUS(status); |
192 | } | 192 | } |
193 | 193 | ||
@@ -233,7 +233,9 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, | |||
233 | 233 | ||
234 | /* All other types are an error */ | 234 | /* All other types are an error */ |
235 | 235 | ||
236 | ACPI_REPORT_ERROR(("Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)\n", acpi_ut_get_type_name(node->type), path)); | 236 | ACPI_ERROR((AE_INFO, |
237 | "Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)", | ||
238 | acpi_ut_get_type_name(node->type), path)); | ||
237 | 239 | ||
238 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 240 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
239 | } | 241 | } |
@@ -300,7 +302,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, | |||
300 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, | 302 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, |
301 | &(node)); | 303 | &(node)); |
302 | if (ACPI_FAILURE(status)) { | 304 | if (ACPI_FAILURE(status)) { |
303 | ACPI_REPORT_NSERROR(path, status); | 305 | ACPI_ERROR_NAMESPACE(path, status); |
304 | return_ACPI_STATUS(status); | 306 | return_ACPI_STATUS(status); |
305 | } | 307 | } |
306 | break; | 308 | break; |
@@ -618,10 +620,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, | |||
618 | if (status == AE_NOT_FOUND) { | 620 | if (status == AE_NOT_FOUND) { |
619 | status = AE_OK; | 621 | status = AE_OK; |
620 | } else { | 622 | } else { |
621 | ACPI_REPORT_NSERROR(buffer_ptr, status); | 623 | ACPI_ERROR_NAMESPACE(buffer_ptr, status); |
622 | } | 624 | } |
623 | #else | 625 | #else |
624 | ACPI_REPORT_NSERROR(buffer_ptr, status); | 626 | ACPI_ERROR_NAMESPACE(buffer_ptr, status); |
625 | #endif | 627 | #endif |
626 | return_ACPI_STATUS(status); | 628 | return_ACPI_STATUS(status); |
627 | } | 629 | } |
@@ -651,7 +653,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, | |||
651 | * Scope (DEB) { ... } | 653 | * Scope (DEB) { ... } |
652 | */ | 654 | */ |
653 | 655 | ||
654 | ACPI_REPORT_WARNING(("Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n", buffer_ptr, acpi_ut_get_type_name(node->type))); | 656 | ACPI_WARNING((AE_INFO, |
657 | "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)", | ||
658 | buffer_ptr, | ||
659 | acpi_ut_get_type_name(node->type))); | ||
655 | 660 | ||
656 | node->type = ACPI_TYPE_ANY; | 661 | node->type = ACPI_TYPE_ANY; |
657 | walk_state->scope_info->common.value = ACPI_TYPE_ANY; | 662 | walk_state->scope_info->common.value = ACPI_TYPE_ANY; |
@@ -661,7 +666,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, | |||
661 | 666 | ||
662 | /* All other types are an error */ | 667 | /* All other types are an error */ |
663 | 668 | ||
664 | ACPI_REPORT_ERROR(("Invalid type (%s) for target of Scope operator [%4.4s]\n", acpi_ut_get_type_name(node->type), buffer_ptr)); | 669 | ACPI_ERROR((AE_INFO, |
670 | "Invalid type (%s) for target of Scope operator [%4.4s]", | ||
671 | acpi_ut_get_type_name(node->type), | ||
672 | buffer_ptr)); | ||
665 | 673 | ||
666 | return (AE_AML_OPERAND_TYPE); | 674 | return (AE_AML_OPERAND_TYPE); |
667 | } | 675 | } |
@@ -714,7 +722,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, | |||
714 | } | 722 | } |
715 | 723 | ||
716 | if (ACPI_FAILURE(status)) { | 724 | if (ACPI_FAILURE(status)) { |
717 | ACPI_REPORT_NSERROR(buffer_ptr, status); | 725 | ACPI_ERROR_NAMESPACE(buffer_ptr, status); |
718 | return_ACPI_STATUS(status); | 726 | return_ACPI_STATUS(status); |
719 | } | 727 | } |
720 | 728 | ||
@@ -1112,7 +1120,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) | |||
1112 | */ | 1120 | */ |
1113 | op->common.node = new_node; | 1121 | op->common.node = new_node; |
1114 | } else { | 1122 | } else { |
1115 | ACPI_REPORT_NSERROR(arg->common.value.string, status); | 1123 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
1116 | } | 1124 | } |
1117 | break; | 1125 | break; |
1118 | 1126 | ||
diff --git a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c index e7fc88ca47ba..ada21ef4a174 100644 --- a/drivers/acpi/dispatcher/dswscope.c +++ b/drivers/acpi/dispatcher/dswscope.c | |||
@@ -107,14 +107,14 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node, | |||
107 | if (!node) { | 107 | if (!node) { |
108 | /* Invalid scope */ | 108 | /* Invalid scope */ |
109 | 109 | ||
110 | ACPI_REPORT_ERROR(("Null scope parameter\n")); | 110 | ACPI_ERROR((AE_INFO, "Null scope parameter")); |
111 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 111 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
112 | } | 112 | } |
113 | 113 | ||
114 | /* Make sure object type is valid */ | 114 | /* Make sure object type is valid */ |
115 | 115 | ||
116 | if (!acpi_ut_valid_object_type(type)) { | 116 | if (!acpi_ut_valid_object_type(type)) { |
117 | ACPI_REPORT_WARNING(("Invalid object type: 0x%X\n", type)); | 117 | ACPI_WARNING((AE_INFO, "Invalid object type: 0x%X", type)); |
118 | } | 118 | } |
119 | 119 | ||
120 | /* Allocate a new scope object */ | 120 | /* Allocate a new scope object */ |
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c index 61aae2dcc5e2..fa78cb74ee36 100644 --- a/drivers/acpi/dispatcher/dswstate.c +++ b/drivers/acpi/dispatcher/dswstate.c | |||
@@ -92,23 +92,23 @@ acpi_ds_result_remove(union acpi_operand_object **object, | |||
92 | 92 | ||
93 | state = walk_state->results; | 93 | state = walk_state->results; |
94 | if (!state) { | 94 | if (!state) { |
95 | ACPI_REPORT_ERROR(("No result object pushed! State=%p\n", | 95 | ACPI_ERROR((AE_INFO, "No result object pushed! State=%p", |
96 | walk_state)); | 96 | walk_state)); |
97 | return (AE_NOT_EXIST); | 97 | return (AE_NOT_EXIST); |
98 | } | 98 | } |
99 | 99 | ||
100 | if (index >= ACPI_OBJ_MAX_OPERAND) { | 100 | if (index >= ACPI_OBJ_MAX_OPERAND) { |
101 | ACPI_REPORT_ERROR(("Index out of range: %X State=%p Num=%X\n", | 101 | ACPI_ERROR((AE_INFO, |
102 | index, walk_state, | 102 | "Index out of range: %X State=%p Num=%X", |
103 | state->results.num_results)); | 103 | index, walk_state, state->results.num_results)); |
104 | } | 104 | } |
105 | 105 | ||
106 | /* Check for a valid result object */ | 106 | /* Check for a valid result object */ |
107 | 107 | ||
108 | if (!state->results.obj_desc[index]) { | 108 | if (!state->results.obj_desc[index]) { |
109 | ACPI_REPORT_ERROR(("Null operand! State=%p #Ops=%X, Index=%X\n", | 109 | ACPI_ERROR((AE_INFO, |
110 | walk_state, state->results.num_results, | 110 | "Null operand! State=%p #Ops=%X, Index=%X", |
111 | index)); | 111 | walk_state, state->results.num_results, index)); |
112 | return (AE_AML_NO_RETURN_VALUE); | 112 | return (AE_AML_NO_RETURN_VALUE); |
113 | } | 113 | } |
114 | 114 | ||
@@ -160,8 +160,8 @@ acpi_ds_result_pop(union acpi_operand_object ** object, | |||
160 | } | 160 | } |
161 | 161 | ||
162 | if (!state->results.num_results) { | 162 | if (!state->results.num_results) { |
163 | ACPI_REPORT_ERROR(("Result stack is empty! State=%p\n", | 163 | ACPI_ERROR((AE_INFO, "Result stack is empty! State=%p", |
164 | walk_state)); | 164 | walk_state)); |
165 | return (AE_AML_NO_RETURN_VALUE); | 165 | return (AE_AML_NO_RETURN_VALUE); |
166 | } | 166 | } |
167 | 167 | ||
@@ -188,7 +188,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object, | |||
188 | } | 188 | } |
189 | } | 189 | } |
190 | 190 | ||
191 | ACPI_REPORT_ERROR(("No result objects! State=%p\n", walk_state)); | 191 | ACPI_ERROR((AE_INFO, "No result objects! State=%p", walk_state)); |
192 | return (AE_AML_NO_RETURN_VALUE); | 192 | return (AE_AML_NO_RETURN_VALUE); |
193 | } | 193 | } |
194 | 194 | ||
@@ -217,14 +217,14 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object, | |||
217 | 217 | ||
218 | state = walk_state->results; | 218 | state = walk_state->results; |
219 | if (!state) { | 219 | if (!state) { |
220 | ACPI_REPORT_ERROR(("No result object pushed! State=%p\n", | 220 | ACPI_ERROR((AE_INFO, |
221 | walk_state)); | 221 | "No result object pushed! State=%p", walk_state)); |
222 | return (AE_NOT_EXIST); | 222 | return (AE_NOT_EXIST); |
223 | } | 223 | } |
224 | 224 | ||
225 | if (!state->results.num_results) { | 225 | if (!state->results.num_results) { |
226 | ACPI_REPORT_ERROR(("No result objects! State=%p\n", | 226 | ACPI_ERROR((AE_INFO, "No result objects! State=%p", |
227 | walk_state)); | 227 | walk_state)); |
228 | return (AE_AML_NO_RETURN_VALUE); | 228 | return (AE_AML_NO_RETURN_VALUE); |
229 | } | 229 | } |
230 | 230 | ||
@@ -244,9 +244,10 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object, | |||
244 | /* Check for a valid result object */ | 244 | /* Check for a valid result object */ |
245 | 245 | ||
246 | if (!*object) { | 246 | if (!*object) { |
247 | ACPI_REPORT_ERROR(("Null operand! State=%p #Ops=%X Index=%X\n", | 247 | ACPI_ERROR((AE_INFO, |
248 | walk_state, state->results.num_results, | 248 | "Null operand! State=%p #Ops=%X Index=%X", |
249 | (u32) index)); | 249 | walk_state, state->results.num_results, |
250 | (u32) index)); | ||
250 | return (AE_AML_NO_RETURN_VALUE); | 251 | return (AE_AML_NO_RETURN_VALUE); |
251 | } | 252 | } |
252 | 253 | ||
@@ -281,19 +282,21 @@ acpi_ds_result_push(union acpi_operand_object * object, | |||
281 | 282 | ||
282 | state = walk_state->results; | 283 | state = walk_state->results; |
283 | if (!state) { | 284 | if (!state) { |
284 | ACPI_REPORT_ERROR(("No result stack frame during push\n")); | 285 | ACPI_ERROR((AE_INFO, "No result stack frame during push")); |
285 | return (AE_AML_INTERNAL); | 286 | return (AE_AML_INTERNAL); |
286 | } | 287 | } |
287 | 288 | ||
288 | if (state->results.num_results == ACPI_OBJ_NUM_OPERANDS) { | 289 | if (state->results.num_results == ACPI_OBJ_NUM_OPERANDS) { |
289 | ACPI_REPORT_ERROR(("Result stack overflow: Obj=%p State=%p Num=%X\n", object, walk_state, state->results.num_results)); | 290 | ACPI_ERROR((AE_INFO, |
291 | "Result stack overflow: Obj=%p State=%p Num=%X", | ||
292 | object, walk_state, state->results.num_results)); | ||
290 | return (AE_STACK_OVERFLOW); | 293 | return (AE_STACK_OVERFLOW); |
291 | } | 294 | } |
292 | 295 | ||
293 | if (!object) { | 296 | if (!object) { |
294 | ACPI_REPORT_ERROR(("Null Object! Obj=%p State=%p Num=%X\n", | 297 | ACPI_ERROR((AE_INFO, |
295 | object, walk_state, | 298 | "Null Object! Obj=%p State=%p Num=%X", |
296 | state->results.num_results)); | 299 | object, walk_state, state->results.num_results)); |
297 | return (AE_BAD_PARAMETER); | 300 | return (AE_BAD_PARAMETER); |
298 | } | 301 | } |
299 | 302 | ||
@@ -402,7 +405,9 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state) | |||
402 | /* Check for stack overflow */ | 405 | /* Check for stack overflow */ |
403 | 406 | ||
404 | if (walk_state->num_operands >= ACPI_OBJ_NUM_OPERANDS) { | 407 | if (walk_state->num_operands >= ACPI_OBJ_NUM_OPERANDS) { |
405 | ACPI_REPORT_ERROR(("Object stack overflow! Obj=%p State=%p #Ops=%X\n", object, walk_state, walk_state->num_operands)); | 408 | ACPI_ERROR((AE_INFO, |
409 | "Object stack overflow! Obj=%p State=%p #Ops=%X", | ||
410 | object, walk_state, walk_state->num_operands)); | ||
406 | return (AE_STACK_OVERFLOW); | 411 | return (AE_STACK_OVERFLOW); |
407 | } | 412 | } |
408 | 413 | ||
@@ -446,7 +451,10 @@ acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state) | |||
446 | /* Check for stack underflow */ | 451 | /* Check for stack underflow */ |
447 | 452 | ||
448 | if (walk_state->num_operands == 0) { | 453 | if (walk_state->num_operands == 0) { |
449 | ACPI_REPORT_ERROR(("Object stack underflow! Count=%X State=%p #Ops=%X\n", pop_count, walk_state, walk_state->num_operands)); | 454 | ACPI_ERROR((AE_INFO, |
455 | "Object stack underflow! Count=%X State=%p #Ops=%X", | ||
456 | pop_count, walk_state, | ||
457 | walk_state->num_operands)); | ||
450 | return (AE_STACK_UNDERFLOW); | 458 | return (AE_STACK_UNDERFLOW); |
451 | } | 459 | } |
452 | 460 | ||
@@ -489,7 +497,10 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count, | |||
489 | /* Check for stack underflow */ | 497 | /* Check for stack underflow */ |
490 | 498 | ||
491 | if (walk_state->num_operands == 0) { | 499 | if (walk_state->num_operands == 0) { |
492 | ACPI_REPORT_ERROR(("Object stack underflow! Count=%X State=%p #Ops=%X\n", pop_count, walk_state, walk_state->num_operands)); | 500 | ACPI_ERROR((AE_INFO, |
501 | "Object stack underflow! Count=%X State=%p #Ops=%X", | ||
502 | pop_count, walk_state, | ||
503 | walk_state->num_operands)); | ||
493 | return (AE_STACK_UNDERFLOW); | 504 | return (AE_STACK_UNDERFLOW); |
494 | } | 505 | } |
495 | 506 | ||
@@ -806,14 +817,14 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state) | |||
806 | } | 817 | } |
807 | 818 | ||
808 | if (walk_state->data_type != ACPI_DESC_TYPE_WALK) { | 819 | if (walk_state->data_type != ACPI_DESC_TYPE_WALK) { |
809 | ACPI_REPORT_ERROR(("%p is not a valid walk state\n", | 820 | ACPI_ERROR((AE_INFO, "%p is not a valid walk state", |
810 | walk_state)); | 821 | walk_state)); |
811 | return; | 822 | return; |
812 | } | 823 | } |
813 | 824 | ||
814 | if (walk_state->parser_state.scope) { | 825 | if (walk_state->parser_state.scope) { |
815 | ACPI_REPORT_ERROR(("%p walk still has a scope list\n", | 826 | ACPI_ERROR((AE_INFO, "%p walk still has a scope list", |
816 | walk_state)); | 827 | walk_state)); |
817 | } | 828 | } |
818 | 829 | ||
819 | /* Always must free any linked control states */ | 830 | /* Always must free any linked control states */ |
@@ -872,18 +883,24 @@ acpi_ds_result_insert(void *object, | |||
872 | 883 | ||
873 | state = walk_state->results; | 884 | state = walk_state->results; |
874 | if (!state) { | 885 | if (!state) { |
875 | ACPI_REPORT_ERROR(("No result object pushed! State=%p\n", | 886 | ACPI_ERROR((AE_INFO, "No result object pushed! State=%p", |
876 | walk_state)); | 887 | walk_state)); |
877 | return (AE_NOT_EXIST); | 888 | return (AE_NOT_EXIST); |
878 | } | 889 | } |
879 | 890 | ||
880 | if (index >= ACPI_OBJ_NUM_OPERANDS) { | 891 | if (index >= ACPI_OBJ_NUM_OPERANDS) { |
881 | ACPI_REPORT_ERROR(("Index out of range: %X Obj=%p State=%p Num=%X\n", index, object, walk_state, state->results.num_results)); | 892 | ACPI_ERROR((AE_INFO, |
893 | "Index out of range: %X Obj=%p State=%p Num=%X", | ||
894 | index, object, walk_state, | ||
895 | state->results.num_results)); | ||
882 | return (AE_BAD_PARAMETER); | 896 | return (AE_BAD_PARAMETER); |
883 | } | 897 | } |
884 | 898 | ||
885 | if (!object) { | 899 | if (!object) { |
886 | ACPI_REPORT_ERROR(("Null Object! Index=%X Obj=%p State=%p Num=%X\n", index, object, walk_state, state->results.num_results)); | 900 | ACPI_ERROR((AE_INFO, |
901 | "Null Object! Index=%X Obj=%p State=%p Num=%X", | ||
902 | index, object, walk_state, | ||
903 | state->results.num_results)); | ||
887 | return (AE_BAD_PARAMETER); | 904 | return (AE_BAD_PARAMETER); |
888 | } | 905 | } |
889 | 906 | ||
@@ -957,7 +974,9 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object, | |||
957 | /* Check for stack underflow */ | 974 | /* Check for stack underflow */ |
958 | 975 | ||
959 | if (walk_state->num_operands == 0) { | 976 | if (walk_state->num_operands == 0) { |
960 | ACPI_REPORT_ERROR(("Missing operand/stack empty! State=%p #Ops=%X\n", walk_state, walk_state->num_operands)); | 977 | ACPI_ERROR((AE_INFO, |
978 | "Missing operand/stack empty! State=%p #Ops=%X", | ||
979 | walk_state, walk_state->num_operands)); | ||
961 | *object = NULL; | 980 | *object = NULL; |
962 | return (AE_AML_NO_OPERAND); | 981 | return (AE_AML_NO_OPERAND); |
963 | } | 982 | } |
@@ -969,8 +988,9 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object, | |||
969 | /* Check for a valid operand */ | 988 | /* Check for a valid operand */ |
970 | 989 | ||
971 | if (!walk_state->operands[walk_state->num_operands]) { | 990 | if (!walk_state->operands[walk_state->num_operands]) { |
972 | ACPI_REPORT_ERROR(("Null operand! State=%p #Ops=%X\n", | 991 | ACPI_ERROR((AE_INFO, |
973 | walk_state, walk_state->num_operands)); | 992 | "Null operand! State=%p #Ops=%X", |
993 | walk_state, walk_state->num_operands)); | ||
974 | *object = NULL; | 994 | *object = NULL; |
975 | return (AE_AML_NO_OPERAND); | 995 | return (AE_AML_NO_OPERAND); |
976 | } | 996 | } |
diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c index b380ae1044b7..c9ac05c4685f 100644 --- a/drivers/acpi/events/evevent.c +++ b/drivers/acpi/events/evevent.c | |||
@@ -73,7 +73,7 @@ acpi_status acpi_ev_initialize_events(void) | |||
73 | /* Make sure we have ACPI tables */ | 73 | /* Make sure we have ACPI tables */ |
74 | 74 | ||
75 | if (!acpi_gbl_DSDT) { | 75 | if (!acpi_gbl_DSDT) { |
76 | ACPI_REPORT_WARNING(("No ACPI tables present!\n")); | 76 | ACPI_WARNING((AE_INFO, "No ACPI tables present!")); |
77 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 77 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
78 | } | 78 | } |
79 | 79 | ||
@@ -84,14 +84,15 @@ acpi_status acpi_ev_initialize_events(void) | |||
84 | */ | 84 | */ |
85 | status = acpi_ev_fixed_event_initialize(); | 85 | status = acpi_ev_fixed_event_initialize(); |
86 | if (ACPI_FAILURE(status)) { | 86 | if (ACPI_FAILURE(status)) { |
87 | ACPI_REPORT_ERROR(("Unable to initialize fixed events, %s\n", | 87 | ACPI_EXCEPTION((AE_INFO, status, |
88 | acpi_format_exception(status))); | 88 | "Unable to initialize fixed events")); |
89 | return_ACPI_STATUS(status); | 89 | return_ACPI_STATUS(status); |
90 | } | 90 | } |
91 | 91 | ||
92 | status = acpi_ev_gpe_initialize(); | 92 | status = acpi_ev_gpe_initialize(); |
93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
94 | ACPI_REPORT_ERROR(("Unable to initialize general purpose events, %s\n", acpi_format_exception(status))); | 94 | ACPI_EXCEPTION((AE_INFO, status, |
95 | "Unable to initialize general purpose events")); | ||
95 | return_ACPI_STATUS(status); | 96 | return_ACPI_STATUS(status); |
96 | } | 97 | } |
97 | 98 | ||
@@ -162,7 +163,8 @@ acpi_status acpi_ev_install_xrupt_handlers(void) | |||
162 | 163 | ||
163 | status = acpi_ev_install_sci_handler(); | 164 | status = acpi_ev_install_sci_handler(); |
164 | if (ACPI_FAILURE(status)) { | 165 | if (ACPI_FAILURE(status)) { |
165 | ACPI_REPORT_ERROR(("Unable to install System Control Interrupt Handler, %s\n", acpi_format_exception(status))); | 166 | ACPI_EXCEPTION((AE_INFO, status, |
167 | "Unable to install System Control Interrupt handler")); | ||
166 | return_ACPI_STATUS(status); | 168 | return_ACPI_STATUS(status); |
167 | } | 169 | } |
168 | 170 | ||
@@ -170,7 +172,8 @@ acpi_status acpi_ev_install_xrupt_handlers(void) | |||
170 | 172 | ||
171 | status = acpi_ev_init_global_lock_handler(); | 173 | status = acpi_ev_init_global_lock_handler(); |
172 | if (ACPI_FAILURE(status)) { | 174 | if (ACPI_FAILURE(status)) { |
173 | ACPI_REPORT_ERROR(("Unable to initialize Global Lock handler, %s\n", acpi_format_exception(status))); | 175 | ACPI_EXCEPTION((AE_INFO, status, |
176 | "Unable to initialize Global Lock handler")); | ||
174 | return_ACPI_STATUS(status); | 177 | return_ACPI_STATUS(status); |
175 | } | 178 | } |
176 | 179 | ||
@@ -304,7 +307,9 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event) | |||
304 | enable_register_id, 0, | 307 | enable_register_id, 0, |
305 | ACPI_MTX_DO_NOT_LOCK); | 308 | ACPI_MTX_DO_NOT_LOCK); |
306 | 309 | ||
307 | ACPI_REPORT_ERROR(("No installed handler for fixed event [%08X]\n", event)); | 310 | ACPI_ERROR((AE_INFO, |
311 | "No installed handler for fixed event [%08X]", | ||
312 | event)); | ||
308 | 313 | ||
309 | return (ACPI_INTERRUPT_NOT_HANDLED); | 314 | return (ACPI_INTERRUPT_NOT_HANDLED); |
310 | } | 315 | } |
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index 353b907edbfa..f64f977dd3d5 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -379,7 +379,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
379 | u8 enabled_status_byte; | 379 | u8 enabled_status_byte; |
380 | u32 status_reg; | 380 | u32 status_reg; |
381 | u32 enable_reg; | 381 | u32 enable_reg; |
382 | acpi_native_uint flags; | 382 | acpi_cpu_flags flags; |
383 | acpi_native_uint i; | 383 | acpi_native_uint i; |
384 | acpi_native_uint j; | 384 | acpi_native_uint j; |
385 | 385 | ||
@@ -546,7 +546,11 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
546 | 546 | ||
547 | status = acpi_ns_evaluate_by_handle(&info); | 547 | status = acpi_ns_evaluate_by_handle(&info); |
548 | if (ACPI_FAILURE(status)) { | 548 | if (ACPI_FAILURE(status)) { |
549 | ACPI_REPORT_ERROR(("%s while evaluating method [%4.4s] for GPE[%2X]\n", acpi_format_exception(status), acpi_ut_get_node_name(local_gpe_event_info.dispatch.method_node), gpe_number)); | 549 | ACPI_EXCEPTION((AE_INFO, status, |
550 | "While evaluating method [%4.4s] for GPE[%2X]", | ||
551 | acpi_ut_get_node_name | ||
552 | (local_gpe_event_info.dispatch. | ||
553 | method_node), gpe_number)); | ||
550 | } | 554 | } |
551 | } | 555 | } |
552 | 556 | ||
@@ -599,9 +603,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
599 | ACPI_GPE_EDGE_TRIGGERED) { | 603 | ACPI_GPE_EDGE_TRIGGERED) { |
600 | status = acpi_hw_clear_gpe(gpe_event_info); | 604 | status = acpi_hw_clear_gpe(gpe_event_info); |
601 | if (ACPI_FAILURE(status)) { | 605 | if (ACPI_FAILURE(status)) { |
602 | ACPI_REPORT_ERROR(("%s, Unable to clear GPE[%2X]\n", | 606 | ACPI_EXCEPTION((AE_INFO, status, |
603 | acpi_format_exception(status), | 607 | "Unable to clear GPE[%2X]", |
604 | gpe_number)); | 608 | gpe_number)); |
605 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | 609 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); |
606 | } | 610 | } |
607 | } | 611 | } |
@@ -639,7 +643,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
639 | ACPI_GPE_LEVEL_TRIGGERED) { | 643 | ACPI_GPE_LEVEL_TRIGGERED) { |
640 | status = acpi_hw_clear_gpe(gpe_event_info); | 644 | status = acpi_hw_clear_gpe(gpe_event_info); |
641 | if (ACPI_FAILURE(status)) { | 645 | if (ACPI_FAILURE(status)) { |
642 | ACPI_REPORT_ERROR(("%s, Unable to clear GPE[%2X]\n", acpi_format_exception(status), gpe_number)); | 646 | ACPI_EXCEPTION((AE_INFO, status, |
647 | "Unable to clear GPE[%2X]", | ||
648 | gpe_number)); | ||
643 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | 649 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); |
644 | } | 650 | } |
645 | } | 651 | } |
@@ -653,9 +659,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
653 | */ | 659 | */ |
654 | status = acpi_ev_disable_gpe(gpe_event_info); | 660 | status = acpi_ev_disable_gpe(gpe_event_info); |
655 | if (ACPI_FAILURE(status)) { | 661 | if (ACPI_FAILURE(status)) { |
656 | ACPI_REPORT_ERROR(("%s, Unable to disable GPE[%2X]\n", | 662 | ACPI_EXCEPTION((AE_INFO, status, |
657 | acpi_format_exception(status), | 663 | "Unable to disable GPE[%2X]", |
658 | gpe_number)); | 664 | gpe_number)); |
659 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | 665 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); |
660 | } | 666 | } |
661 | 667 | ||
@@ -667,7 +673,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
667 | acpi_ev_asynch_execute_gpe_method, | 673 | acpi_ev_asynch_execute_gpe_method, |
668 | gpe_event_info); | 674 | gpe_event_info); |
669 | if (ACPI_FAILURE(status)) { | 675 | if (ACPI_FAILURE(status)) { |
670 | ACPI_REPORT_ERROR(("%s, Unable to queue handler for GPE[%2X] - event disabled\n", acpi_format_exception(status), gpe_number)); | 676 | ACPI_EXCEPTION((AE_INFO, status, |
677 | "Unable to queue handler for GPE[%2X] - event disabled", | ||
678 | gpe_number)); | ||
671 | } | 679 | } |
672 | break; | 680 | break; |
673 | 681 | ||
@@ -675,7 +683,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
675 | 683 | ||
676 | /* No handler or method to run! */ | 684 | /* No handler or method to run! */ |
677 | 685 | ||
678 | ACPI_REPORT_ERROR(("No handler or method for GPE[%2X], disabling event\n", gpe_number)); | 686 | ACPI_ERROR((AE_INFO, |
687 | "No handler or method for GPE[%2X], disabling event", | ||
688 | gpe_number)); | ||
679 | 689 | ||
680 | /* | 690 | /* |
681 | * Disable the GPE. The GPE will remain disabled until the ACPI | 691 | * Disable the GPE. The GPE will remain disabled until the ACPI |
@@ -683,9 +693,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
683 | */ | 693 | */ |
684 | status = acpi_ev_disable_gpe(gpe_event_info); | 694 | status = acpi_ev_disable_gpe(gpe_event_info); |
685 | if (ACPI_FAILURE(status)) { | 695 | if (ACPI_FAILURE(status)) { |
686 | ACPI_REPORT_ERROR(("%s, Unable to disable GPE[%2X]\n", | 696 | ACPI_EXCEPTION((AE_INFO, status, |
687 | acpi_format_exception(status), | 697 | "Unable to disable GPE[%2X]", |
688 | gpe_number)); | 698 | gpe_number)); |
689 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | 699 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); |
690 | } | 700 | } |
691 | break; | 701 | break; |
@@ -728,7 +738,9 @@ acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
728 | 738 | ||
729 | acpi_ev_set_gpe_type(gpe_event_info, ACPI_GPE_TYPE_WAKE); | 739 | acpi_ev_set_gpe_type(gpe_event_info, ACPI_GPE_TYPE_WAKE); |
730 | 740 | ||
731 | ACPI_REPORT_INFO(("GPE %p was updated from wake/run to wake-only\n", gpe_event_info)); | 741 | ACPI_INFO((AE_INFO, |
742 | "GPE %p was updated from wake/run to wake-only", | ||
743 | gpe_event_info)); | ||
732 | 744 | ||
733 | /* This was a wake-only GPE */ | 745 | /* This was a wake-only GPE */ |
734 | 746 | ||
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c index 3b9bbdda551d..0fd00b5ad650 100644 --- a/drivers/acpi/events/evgpeblk.c +++ b/drivers/acpi/events/evgpeblk.c | |||
@@ -136,7 +136,7 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback) | |||
136 | struct acpi_gpe_block_info *gpe_block; | 136 | struct acpi_gpe_block_info *gpe_block; |
137 | struct acpi_gpe_xrupt_info *gpe_xrupt_info; | 137 | struct acpi_gpe_xrupt_info *gpe_xrupt_info; |
138 | acpi_status status = AE_OK; | 138 | acpi_status status = AE_OK; |
139 | acpi_native_uint flags; | 139 | acpi_cpu_flags flags; |
140 | 140 | ||
141 | ACPI_FUNCTION_TRACE("ev_walk_gpe_list"); | 141 | ACPI_FUNCTION_TRACE("ev_walk_gpe_list"); |
142 | 142 | ||
@@ -279,7 +279,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle, | |||
279 | default: | 279 | default: |
280 | /* Unknown method type, just ignore it! */ | 280 | /* Unknown method type, just ignore it! */ |
281 | 281 | ||
282 | ACPI_REPORT_ERROR(("Unknown GPE method type: %s (name not of form _Lxx or _Exx)\n", name)); | 282 | ACPI_ERROR((AE_INFO, |
283 | "Unknown GPE method type: %s (name not of form _Lxx or _Exx)", | ||
284 | name)); | ||
283 | return_ACPI_STATUS(AE_OK); | 285 | return_ACPI_STATUS(AE_OK); |
284 | } | 286 | } |
285 | 287 | ||
@@ -289,7 +291,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle, | |||
289 | if (gpe_number == ACPI_UINT32_MAX) { | 291 | if (gpe_number == ACPI_UINT32_MAX) { |
290 | /* Conversion failed; invalid method, just ignore it */ | 292 | /* Conversion failed; invalid method, just ignore it */ |
291 | 293 | ||
292 | ACPI_REPORT_ERROR(("Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)\n", name)); | 294 | ACPI_ERROR((AE_INFO, |
295 | "Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)", | ||
296 | name)); | ||
293 | return_ACPI_STATUS(AE_OK); | 297 | return_ACPI_STATUS(AE_OK); |
294 | } | 298 | } |
295 | 299 | ||
@@ -476,7 +480,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 | |||
476 | struct acpi_gpe_xrupt_info *next_gpe_xrupt; | 480 | struct acpi_gpe_xrupt_info *next_gpe_xrupt; |
477 | struct acpi_gpe_xrupt_info *gpe_xrupt; | 481 | struct acpi_gpe_xrupt_info *gpe_xrupt; |
478 | acpi_status status; | 482 | acpi_status status; |
479 | acpi_native_uint flags; | 483 | acpi_cpu_flags flags; |
480 | 484 | ||
481 | ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block"); | 485 | ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block"); |
482 | 486 | ||
@@ -523,7 +527,9 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 | |||
523 | acpi_ev_gpe_xrupt_handler, | 527 | acpi_ev_gpe_xrupt_handler, |
524 | gpe_xrupt); | 528 | gpe_xrupt); |
525 | if (ACPI_FAILURE(status)) { | 529 | if (ACPI_FAILURE(status)) { |
526 | ACPI_REPORT_ERROR(("Could not install GPE interrupt handler at level 0x%X\n", interrupt_number)); | 530 | ACPI_ERROR((AE_INFO, |
531 | "Could not install GPE interrupt handler at level 0x%X", | ||
532 | interrupt_number)); | ||
527 | return_PTR(NULL); | 533 | return_PTR(NULL); |
528 | } | 534 | } |
529 | } | 535 | } |
@@ -548,7 +554,7 @@ static acpi_status | |||
548 | acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) | 554 | acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) |
549 | { | 555 | { |
550 | acpi_status status; | 556 | acpi_status status; |
551 | acpi_native_uint flags; | 557 | acpi_cpu_flags flags; |
552 | 558 | ||
553 | ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt"); | 559 | ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt"); |
554 | 560 | ||
@@ -606,7 +612,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, | |||
606 | struct acpi_gpe_block_info *next_gpe_block; | 612 | struct acpi_gpe_block_info *next_gpe_block; |
607 | struct acpi_gpe_xrupt_info *gpe_xrupt_block; | 613 | struct acpi_gpe_xrupt_info *gpe_xrupt_block; |
608 | acpi_status status; | 614 | acpi_status status; |
609 | acpi_native_uint flags; | 615 | acpi_cpu_flags flags; |
610 | 616 | ||
611 | ACPI_FUNCTION_TRACE("ev_install_gpe_block"); | 617 | ACPI_FUNCTION_TRACE("ev_install_gpe_block"); |
612 | 618 | ||
@@ -659,7 +665,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, | |||
659 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) | 665 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) |
660 | { | 666 | { |
661 | acpi_status status; | 667 | acpi_status status; |
662 | acpi_native_uint flags; | 668 | acpi_cpu_flags flags; |
663 | 669 | ||
664 | ACPI_FUNCTION_TRACE("ev_install_gpe_block"); | 670 | ACPI_FUNCTION_TRACE("ev_install_gpe_block"); |
665 | 671 | ||
@@ -739,7 +745,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
739 | sizeof(struct | 745 | sizeof(struct |
740 | acpi_gpe_register_info)); | 746 | acpi_gpe_register_info)); |
741 | if (!gpe_register_info) { | 747 | if (!gpe_register_info) { |
742 | ACPI_REPORT_ERROR(("Could not allocate the gpe_register_info table\n")); | 748 | ACPI_ERROR((AE_INFO, |
749 | "Could not allocate the gpe_register_info table")); | ||
743 | return_ACPI_STATUS(AE_NO_MEMORY); | 750 | return_ACPI_STATUS(AE_NO_MEMORY); |
744 | } | 751 | } |
745 | 752 | ||
@@ -752,7 +759,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
752 | ACPI_GPE_REGISTER_WIDTH) * | 759 | ACPI_GPE_REGISTER_WIDTH) * |
753 | sizeof(struct acpi_gpe_event_info)); | 760 | sizeof(struct acpi_gpe_event_info)); |
754 | if (!gpe_event_info) { | 761 | if (!gpe_event_info) { |
755 | ACPI_REPORT_ERROR(("Could not allocate the gpe_event_info table\n")); | 762 | ACPI_ERROR((AE_INFO, |
763 | "Could not allocate the gpe_event_info table")); | ||
756 | status = AE_NO_MEMORY; | 764 | status = AE_NO_MEMORY; |
757 | goto error_exit; | 765 | goto error_exit; |
758 | } | 766 | } |
@@ -1032,8 +1040,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, | |||
1032 | 1040 | ||
1033 | status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block); | 1041 | status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block); |
1034 | if (ACPI_FAILURE(status)) { | 1042 | if (ACPI_FAILURE(status)) { |
1035 | ACPI_REPORT_ERROR(("Could not enable GPEs in gpe_block %p\n", | 1043 | ACPI_ERROR((AE_INFO, "Could not enable GPEs in gpe_block %p", |
1036 | gpe_block)); | 1044 | gpe_block)); |
1037 | } | 1045 | } |
1038 | 1046 | ||
1039 | return_ACPI_STATUS(status); | 1047 | return_ACPI_STATUS(status); |
@@ -1107,8 +1115,8 @@ acpi_status acpi_ev_gpe_initialize(void) | |||
1107 | &acpi_gbl_gpe_fadt_blocks[0]); | 1115 | &acpi_gbl_gpe_fadt_blocks[0]); |
1108 | 1116 | ||
1109 | if (ACPI_FAILURE(status)) { | 1117 | if (ACPI_FAILURE(status)) { |
1110 | ACPI_REPORT_ERROR(("Could not create GPE Block 0, %s\n", | 1118 | ACPI_EXCEPTION((AE_INFO, status, |
1111 | acpi_format_exception(status))); | 1119 | "Could not create GPE Block 0")); |
1112 | } | 1120 | } |
1113 | } | 1121 | } |
1114 | 1122 | ||
@@ -1121,7 +1129,12 @@ acpi_status acpi_ev_gpe_initialize(void) | |||
1121 | 1129 | ||
1122 | if ((register_count0) && | 1130 | if ((register_count0) && |
1123 | (gpe_number_max >= acpi_gbl_FADT->gpe1_base)) { | 1131 | (gpe_number_max >= acpi_gbl_FADT->gpe1_base)) { |
1124 | ACPI_REPORT_ERROR(("GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1\n", gpe_number_max, acpi_gbl_FADT->gpe1_base, acpi_gbl_FADT->gpe1_base + ((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1))); | 1132 | ACPI_ERROR((AE_INFO, |
1133 | "GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1", | ||
1134 | gpe_number_max, acpi_gbl_FADT->gpe1_base, | ||
1135 | acpi_gbl_FADT->gpe1_base + | ||
1136 | ((register_count1 * | ||
1137 | ACPI_GPE_REGISTER_WIDTH) - 1))); | ||
1125 | 1138 | ||
1126 | /* Ignore GPE1 block by setting the register count to zero */ | 1139 | /* Ignore GPE1 block by setting the register count to zero */ |
1127 | 1140 | ||
@@ -1139,7 +1152,8 @@ acpi_status acpi_ev_gpe_initialize(void) | |||
1139 | [1]); | 1152 | [1]); |
1140 | 1153 | ||
1141 | if (ACPI_FAILURE(status)) { | 1154 | if (ACPI_FAILURE(status)) { |
1142 | ACPI_REPORT_ERROR(("Could not create GPE Block 1, %s\n", acpi_format_exception(status))); | 1155 | ACPI_EXCEPTION((AE_INFO, status, |
1156 | "Could not create GPE Block 1")); | ||
1143 | } | 1157 | } |
1144 | 1158 | ||
1145 | /* | 1159 | /* |
@@ -1165,7 +1179,9 @@ acpi_status acpi_ev_gpe_initialize(void) | |||
1165 | /* Check for Max GPE number out-of-range */ | 1179 | /* Check for Max GPE number out-of-range */ |
1166 | 1180 | ||
1167 | if (gpe_number_max > ACPI_GPE_MAX) { | 1181 | if (gpe_number_max > ACPI_GPE_MAX) { |
1168 | ACPI_REPORT_ERROR(("Maximum GPE number from FADT is too large: 0x%X\n", gpe_number_max)); | 1182 | ACPI_ERROR((AE_INFO, |
1183 | "Maximum GPE number from FADT is too large: 0x%X", | ||
1184 | gpe_number_max)); | ||
1169 | status = AE_BAD_VALUE; | 1185 | status = AE_BAD_VALUE; |
1170 | goto cleanup; | 1186 | goto cleanup; |
1171 | } | 1187 | } |
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 78883239784a..0909ba69577e 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c | |||
@@ -303,7 +303,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_global_lock_thread(void *context) | |||
303 | acpi_os_signal_semaphore(acpi_gbl_global_lock_semaphore, | 303 | acpi_os_signal_semaphore(acpi_gbl_global_lock_semaphore, |
304 | acpi_gbl_global_lock_thread_count); | 304 | acpi_gbl_global_lock_thread_count); |
305 | if (ACPI_FAILURE(status)) { | 305 | if (ACPI_FAILURE(status)) { |
306 | ACPI_REPORT_ERROR(("Could not signal Global Lock semaphore\n")); | 306 | ACPI_ERROR((AE_INFO, |
307 | "Could not signal Global Lock semaphore")); | ||
307 | } | 308 | } |
308 | } | 309 | } |
309 | } | 310 | } |
@@ -344,7 +345,8 @@ static u32 acpi_ev_global_lock_handler(void *context) | |||
344 | acpi_ev_global_lock_thread, | 345 | acpi_ev_global_lock_thread, |
345 | context); | 346 | context); |
346 | if (ACPI_FAILURE(status)) { | 347 | if (ACPI_FAILURE(status)) { |
347 | ACPI_REPORT_ERROR(("Could not queue Global Lock thread, %s\n", acpi_format_exception(status))); | 348 | ACPI_EXCEPTION((AE_INFO, status, |
349 | "Could not queue Global Lock thread")); | ||
348 | 350 | ||
349 | return (ACPI_INTERRUPT_NOT_HANDLED); | 351 | return (ACPI_INTERRUPT_NOT_HANDLED); |
350 | } | 352 | } |
@@ -384,7 +386,8 @@ acpi_status acpi_ev_init_global_lock_handler(void) | |||
384 | * with an error. | 386 | * with an error. |
385 | */ | 387 | */ |
386 | if (status == AE_NO_HARDWARE_RESPONSE) { | 388 | if (status == AE_NO_HARDWARE_RESPONSE) { |
387 | ACPI_REPORT_ERROR(("No response from Global Lock hardware, disabling lock\n")); | 389 | ACPI_ERROR((AE_INFO, |
390 | "No response from Global Lock hardware, disabling lock")); | ||
388 | 391 | ||
389 | acpi_gbl_global_lock_present = FALSE; | 392 | acpi_gbl_global_lock_present = FALSE; |
390 | status = AE_OK; | 393 | status = AE_OK; |
@@ -480,7 +483,8 @@ acpi_status acpi_ev_release_global_lock(void) | |||
480 | ACPI_FUNCTION_TRACE("ev_release_global_lock"); | 483 | ACPI_FUNCTION_TRACE("ev_release_global_lock"); |
481 | 484 | ||
482 | if (!acpi_gbl_global_lock_thread_count) { | 485 | if (!acpi_gbl_global_lock_thread_count) { |
483 | ACPI_REPORT_WARNING(("Cannot release HW Global Lock, it has not been acquired\n")); | 486 | ACPI_WARNING((AE_INFO, |
487 | "Cannot release HW Global Lock, it has not been acquired")); | ||
484 | return_ACPI_STATUS(AE_NOT_ACQUIRED); | 488 | return_ACPI_STATUS(AE_NOT_ACQUIRED); |
485 | } | 489 | } |
486 | 490 | ||
@@ -542,7 +546,9 @@ void acpi_ev_terminate(void) | |||
542 | for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { | 546 | for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { |
543 | status = acpi_disable_event((u32) i, 0); | 547 | status = acpi_disable_event((u32) i, 0); |
544 | if (ACPI_FAILURE(status)) { | 548 | if (ACPI_FAILURE(status)) { |
545 | ACPI_REPORT_ERROR(("Could not disable fixed event %d\n", (u32) i)); | 549 | ACPI_ERROR((AE_INFO, |
550 | "Could not disable fixed event %d", | ||
551 | (u32) i)); | ||
546 | } | 552 | } |
547 | } | 553 | } |
548 | 554 | ||
@@ -554,7 +560,7 @@ void acpi_ev_terminate(void) | |||
554 | 560 | ||
555 | status = acpi_ev_remove_sci_handler(); | 561 | status = acpi_ev_remove_sci_handler(); |
556 | if (ACPI_FAILURE(status)) { | 562 | if (ACPI_FAILURE(status)) { |
557 | ACPI_REPORT_ERROR(("Could not remove SCI handler\n")); | 563 | ACPI_ERROR((AE_INFO, "Could not remove SCI handler")); |
558 | } | 564 | } |
559 | } | 565 | } |
560 | 566 | ||
@@ -567,7 +573,7 @@ void acpi_ev_terminate(void) | |||
567 | if (acpi_gbl_original_mode == ACPI_SYS_MODE_LEGACY) { | 573 | if (acpi_gbl_original_mode == ACPI_SYS_MODE_LEGACY) { |
568 | status = acpi_disable(); | 574 | status = acpi_disable(); |
569 | if (ACPI_FAILURE(status)) { | 575 | if (ACPI_FAILURE(status)) { |
570 | ACPI_REPORT_WARNING(("acpi_disable failed\n")); | 576 | ACPI_WARNING((AE_INFO, "acpi_disable failed")); |
571 | } | 577 | } |
572 | } | 578 | } |
573 | return_VOID; | 579 | return_VOID; |
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index 900e5b32e595..6da58e776413 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c | |||
@@ -295,11 +295,12 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
295 | 295 | ||
296 | handler_desc = region_obj->region.handler; | 296 | handler_desc = region_obj->region.handler; |
297 | if (!handler_desc) { | 297 | if (!handler_desc) { |
298 | ACPI_REPORT_ERROR(("No handler for Region [%4.4s] (%p) [%s]\n", | 298 | ACPI_ERROR((AE_INFO, |
299 | acpi_ut_get_node_name(region_obj->region. | 299 | "No handler for Region [%4.4s] (%p) [%s]", |
300 | node), region_obj, | 300 | acpi_ut_get_node_name(region_obj->region.node), |
301 | acpi_ut_get_region_name(region_obj->region. | 301 | region_obj, |
302 | space_id))); | 302 | acpi_ut_get_region_name(region_obj->region. |
303 | space_id))); | ||
303 | 304 | ||
304 | return_ACPI_STATUS(AE_NOT_EXIST); | 305 | return_ACPI_STATUS(AE_NOT_EXIST); |
305 | } | 306 | } |
@@ -316,7 +317,11 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
316 | if (!region_setup) { | 317 | if (!region_setup) { |
317 | /* No initialization routine, exit with error */ | 318 | /* No initialization routine, exit with error */ |
318 | 319 | ||
319 | ACPI_REPORT_ERROR(("No init routine for region(%p) [%s]\n", region_obj, acpi_ut_get_region_name(region_obj->region.space_id))); | 320 | ACPI_ERROR((AE_INFO, |
321 | "No init routine for region(%p) [%s]", | ||
322 | region_obj, | ||
323 | acpi_ut_get_region_name(region_obj->region. | ||
324 | space_id))); | ||
320 | return_ACPI_STATUS(AE_NOT_EXIST); | 325 | return_ACPI_STATUS(AE_NOT_EXIST); |
321 | } | 326 | } |
322 | 327 | ||
@@ -341,11 +346,11 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
341 | /* Check for failure of the Region Setup */ | 346 | /* Check for failure of the Region Setup */ |
342 | 347 | ||
343 | if (ACPI_FAILURE(status)) { | 348 | if (ACPI_FAILURE(status)) { |
344 | ACPI_REPORT_ERROR(("Region Initialization: %s [%s]\n", | 349 | ACPI_EXCEPTION((AE_INFO, status, |
345 | acpi_format_exception(status), | 350 | "During region initialization: [%s]", |
346 | acpi_ut_get_region_name(region_obj-> | 351 | acpi_ut_get_region_name(region_obj-> |
347 | region. | 352 | region. |
348 | space_id))); | 353 | space_id))); |
349 | return_ACPI_STATUS(status); | 354 | return_ACPI_STATUS(status); |
350 | } | 355 | } |
351 | 356 | ||
@@ -399,10 +404,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | |||
399 | region_obj2->extra.region_context); | 404 | region_obj2->extra.region_context); |
400 | 405 | ||
401 | if (ACPI_FAILURE(status)) { | 406 | if (ACPI_FAILURE(status)) { |
402 | ACPI_REPORT_ERROR(("Handler for [%s] returned %s\n", | 407 | ACPI_EXCEPTION((AE_INFO, status, "Returned by Handler for [%s]", |
403 | acpi_ut_get_region_name(region_obj->region. | 408 | acpi_ut_get_region_name(region_obj->region. |
404 | space_id), | 409 | space_id))); |
405 | acpi_format_exception(status))); | ||
406 | } | 410 | } |
407 | 411 | ||
408 | if (! | 412 | if (! |
@@ -494,7 +498,10 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, | |||
494 | 498 | ||
495 | status = acpi_ev_execute_reg_method(region_obj, 0); | 499 | status = acpi_ev_execute_reg_method(region_obj, 0); |
496 | if (ACPI_FAILURE(status)) { | 500 | if (ACPI_FAILURE(status)) { |
497 | ACPI_REPORT_ERROR(("%s from region _REG, [%s]\n", acpi_format_exception(status), acpi_ut_get_region_name(region_obj->region.space_id))); | 501 | ACPI_EXCEPTION((AE_INFO, status, |
502 | "from region _REG, [%s]", | ||
503 | acpi_ut_get_region_name | ||
504 | (region_obj->region.space_id))); | ||
498 | } | 505 | } |
499 | 506 | ||
500 | if (acpi_ns_is_locked) { | 507 | if (acpi_ns_is_locked) { |
@@ -516,7 +523,10 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, | |||
516 | /* Init routine may fail, Just ignore errors */ | 523 | /* Init routine may fail, Just ignore errors */ |
517 | 524 | ||
518 | if (ACPI_FAILURE(status)) { | 525 | if (ACPI_FAILURE(status)) { |
519 | ACPI_REPORT_ERROR(("%s from region init, [%s]\n", acpi_format_exception(status), acpi_ut_get_region_name(region_obj->region.space_id))); | 526 | ACPI_EXCEPTION((AE_INFO, status, |
527 | "from region init, [%s]", | ||
528 | acpi_ut_get_region_name | ||
529 | (region_obj->region.space_id))); | ||
520 | } | 530 | } |
521 | 531 | ||
522 | region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE); | 532 | region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE); |
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index de1a38e9ce22..baed8c1a1b9f 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c | |||
@@ -233,7 +233,11 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, | |||
233 | */ | 233 | */ |
234 | status = AE_OK; | 234 | status = AE_OK; |
235 | } else { | 235 | } else { |
236 | ACPI_REPORT_ERROR(("Could not install pci_config handler for Root Bridge %4.4s, %s\n", acpi_ut_get_node_name(pci_root_node), acpi_format_exception(status))); | 236 | ACPI_EXCEPTION((AE_INFO, |
237 | status, | ||
238 | "Could not install pci_config handler for Root Bridge %4.4s", | ||
239 | acpi_ut_get_node_name | ||
240 | (pci_root_node))); | ||
237 | } | 241 | } |
238 | } | 242 | } |
239 | break; | 243 | break; |
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c index b2f69b1ac4b5..b38b39dde543 100644 --- a/drivers/acpi/events/evxface.c +++ b/drivers/acpi/events/evxface.c | |||
@@ -143,8 +143,8 @@ acpi_install_fixed_event_handler(u32 event, | |||
143 | if (ACPI_SUCCESS(status)) | 143 | if (ACPI_SUCCESS(status)) |
144 | status = acpi_enable_event(event, 0); | 144 | status = acpi_enable_event(event, 0); |
145 | if (ACPI_FAILURE(status)) { | 145 | if (ACPI_FAILURE(status)) { |
146 | ACPI_REPORT_WARNING(("Could not enable fixed event %X\n", | 146 | ACPI_WARNING((AE_INFO, "Could not enable fixed event %X", |
147 | event)); | 147 | event)); |
148 | 148 | ||
149 | /* Remove the handler */ | 149 | /* Remove the handler */ |
150 | 150 | ||
@@ -204,7 +204,9 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | |||
204 | acpi_gbl_fixed_event_handlers[event].context = NULL; | 204 | acpi_gbl_fixed_event_handlers[event].context = NULL; |
205 | 205 | ||
206 | if (ACPI_FAILURE(status)) { | 206 | if (ACPI_FAILURE(status)) { |
207 | ACPI_REPORT_WARNING(("Could not write to fixed event enable register %X\n", event)); | 207 | ACPI_WARNING((AE_INFO, |
208 | "Could not write to fixed event enable register %X", | ||
209 | event)); | ||
208 | } else { | 210 | } else { |
209 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabled fixed event %X\n", | 211 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Disabled fixed event %X\n", |
210 | event)); | 212 | event)); |
@@ -561,7 +563,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
561 | struct acpi_gpe_event_info *gpe_event_info; | 563 | struct acpi_gpe_event_info *gpe_event_info; |
562 | struct acpi_handler_info *handler; | 564 | struct acpi_handler_info *handler; |
563 | acpi_status status; | 565 | acpi_status status; |
564 | acpi_native_uint flags; | 566 | acpi_cpu_flags flags; |
565 | 567 | ||
566 | ACPI_FUNCTION_TRACE("acpi_install_gpe_handler"); | 568 | ACPI_FUNCTION_TRACE("acpi_install_gpe_handler"); |
567 | 569 | ||
@@ -652,7 +654,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
652 | struct acpi_gpe_event_info *gpe_event_info; | 654 | struct acpi_gpe_event_info *gpe_event_info; |
653 | struct acpi_handler_info *handler; | 655 | struct acpi_handler_info *handler; |
654 | acpi_status status; | 656 | acpi_status status; |
655 | acpi_native_uint flags; | 657 | acpi_cpu_flags flags; |
656 | 658 | ||
657 | ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler"); | 659 | ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler"); |
658 | 660 | ||
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index 90eb7939e986..ec9ce8429f15 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c | |||
@@ -70,7 +70,7 @@ acpi_status acpi_enable(void) | |||
70 | /* Make sure we have the FADT */ | 70 | /* Make sure we have the FADT */ |
71 | 71 | ||
72 | if (!acpi_gbl_FADT) { | 72 | if (!acpi_gbl_FADT) { |
73 | ACPI_REPORT_WARNING(("No FADT information present!\n")); | 73 | ACPI_WARNING((AE_INFO, "No FADT information present!")); |
74 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 74 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
75 | } | 75 | } |
76 | 76 | ||
@@ -82,7 +82,8 @@ acpi_status acpi_enable(void) | |||
82 | 82 | ||
83 | status = acpi_hw_set_mode(ACPI_SYS_MODE_ACPI); | 83 | status = acpi_hw_set_mode(ACPI_SYS_MODE_ACPI); |
84 | if (ACPI_FAILURE(status)) { | 84 | if (ACPI_FAILURE(status)) { |
85 | ACPI_REPORT_ERROR(("Could not transition to ACPI mode\n")); | 85 | ACPI_ERROR((AE_INFO, |
86 | "Could not transition to ACPI mode")); | ||
86 | return_ACPI_STATUS(status); | 87 | return_ACPI_STATUS(status); |
87 | } | 88 | } |
88 | 89 | ||
@@ -112,7 +113,7 @@ acpi_status acpi_disable(void) | |||
112 | ACPI_FUNCTION_TRACE("acpi_disable"); | 113 | ACPI_FUNCTION_TRACE("acpi_disable"); |
113 | 114 | ||
114 | if (!acpi_gbl_FADT) { | 115 | if (!acpi_gbl_FADT) { |
115 | ACPI_REPORT_WARNING(("No FADT information present!\n")); | 116 | ACPI_WARNING((AE_INFO, "No FADT information present!")); |
116 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 117 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
117 | } | 118 | } |
118 | 119 | ||
@@ -125,7 +126,8 @@ acpi_status acpi_disable(void) | |||
125 | status = acpi_hw_set_mode(ACPI_SYS_MODE_LEGACY); | 126 | status = acpi_hw_set_mode(ACPI_SYS_MODE_LEGACY); |
126 | 127 | ||
127 | if (ACPI_FAILURE(status)) { | 128 | if (ACPI_FAILURE(status)) { |
128 | ACPI_REPORT_ERROR(("Could not exit ACPI mode to legacy mode")); | 129 | ACPI_ERROR((AE_INFO, |
130 | "Could not exit ACPI mode to legacy mode")); | ||
129 | return_ACPI_STATUS(status); | 131 | return_ACPI_STATUS(status); |
130 | } | 132 | } |
131 | 133 | ||
@@ -182,8 +184,9 @@ acpi_status acpi_enable_event(u32 event, u32 flags) | |||
182 | } | 184 | } |
183 | 185 | ||
184 | if (value != 1) { | 186 | if (value != 1) { |
185 | ACPI_REPORT_ERROR(("Could not enable %s event\n", | 187 | ACPI_ERROR((AE_INFO, |
186 | acpi_ut_get_event_name(event))); | 188 | "Could not enable %s event", |
189 | acpi_ut_get_event_name(event))); | ||
187 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); | 190 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); |
188 | } | 191 | } |
189 | 192 | ||
@@ -380,8 +383,9 @@ acpi_status acpi_disable_event(u32 event, u32 flags) | |||
380 | } | 383 | } |
381 | 384 | ||
382 | if (value != 0) { | 385 | if (value != 0) { |
383 | ACPI_REPORT_ERROR(("Could not disable %s events\n", | 386 | ACPI_ERROR((AE_INFO, |
384 | acpi_ut_get_event_name(event))); | 387 | "Could not disable %s events", |
388 | acpi_ut_get_event_name(event))); | ||
385 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); | 389 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); |
386 | } | 390 | } |
387 | 391 | ||
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 109d0255a5bb..a29782fe3ecf 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -413,7 +413,9 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
413 | (!ACPI_STRNCMP(table_ptr->signature, | 413 | (!ACPI_STRNCMP(table_ptr->signature, |
414 | acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, | 414 | acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, |
415 | acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { | 415 | acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { |
416 | ACPI_REPORT_ERROR(("Table has invalid signature [%4.4s], must be SSDT or PSDT\n", table_ptr->signature)); | 416 | ACPI_ERROR((AE_INFO, |
417 | "Table has invalid signature [%4.4s], must be SSDT or PSDT", | ||
418 | table_ptr->signature)); | ||
417 | status = AE_BAD_SIGNATURE; | 419 | status = AE_BAD_SIGNATURE; |
418 | goto cleanup; | 420 | goto cleanup; |
419 | } | 421 | } |
diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c index e6f55cf8ad31..e6d52e12d77a 100644 --- a/drivers/acpi/executer/exconvrt.c +++ b/drivers/acpi/executer/exconvrt.c | |||
@@ -641,7 +641,9 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, | |||
641 | break; | 641 | break; |
642 | 642 | ||
643 | default: | 643 | default: |
644 | ACPI_REPORT_ERROR(("Bad destination type during conversion: %X\n", destination_type)); | 644 | ACPI_ERROR((AE_INFO, |
645 | "Bad destination type during conversion: %X", | ||
646 | destination_type)); | ||
645 | status = AE_AML_INTERNAL; | 647 | status = AE_AML_INTERNAL; |
646 | break; | 648 | break; |
647 | } | 649 | } |
@@ -654,7 +656,12 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, | |||
654 | break; | 656 | break; |
655 | 657 | ||
656 | default: | 658 | default: |
657 | ACPI_REPORT_ERROR(("Unknown Target type ID 0x%X aml_opcode %X dest_type %s\n", GET_CURRENT_ARG_TYPE(walk_state->op_info->runtime_args), walk_state->opcode, acpi_ut_get_type_name(destination_type))); | 659 | ACPI_ERROR((AE_INFO, |
660 | "Unknown Target type ID 0x%X aml_opcode %X dest_type %s", | ||
661 | GET_CURRENT_ARG_TYPE(walk_state->op_info-> | ||
662 | runtime_args), | ||
663 | walk_state->opcode, | ||
664 | acpi_ut_get_type_name(destination_type))); | ||
658 | status = AE_AML_INTERNAL; | 665 | status = AE_AML_INTERNAL; |
659 | } | 666 | } |
660 | 667 | ||
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index da313dad576a..680575402835 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c | |||
@@ -300,8 +300,8 @@ acpi_ex_create_region(u8 * aml_start, | |||
300 | */ | 300 | */ |
301 | if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) && | 301 | if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) && |
302 | (region_space < ACPI_USER_REGION_BEGIN)) { | 302 | (region_space < ACPI_USER_REGION_BEGIN)) { |
303 | ACPI_REPORT_ERROR(("Invalid address_space type %X\n", | 303 | ACPI_ERROR((AE_INFO, "Invalid address_space type %X", |
304 | region_space)); | 304 | region_space)); |
305 | return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); | 305 | return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); |
306 | } | 306 | } |
307 | 307 | ||
diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c index 78a76f91a1c9..e259201ce9a0 100644 --- a/drivers/acpi/executer/exfield.c +++ b/drivers/acpi/executer/exfield.c | |||
@@ -249,13 +249,18 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, | |||
249 | * Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE). | 249 | * Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE). |
250 | */ | 250 | */ |
251 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { | 251 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { |
252 | ACPI_REPORT_ERROR(("SMBus write requires Buffer, found type %s\n", acpi_ut_get_object_type_name(source_desc))); | 252 | ACPI_ERROR((AE_INFO, |
253 | "SMBus write requires Buffer, found type %s", | ||
254 | acpi_ut_get_object_type_name(source_desc))); | ||
253 | 255 | ||
254 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 256 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
255 | } | 257 | } |
256 | 258 | ||
257 | if (source_desc->buffer.length < ACPI_SMBUS_BUFFER_SIZE) { | 259 | if (source_desc->buffer.length < ACPI_SMBUS_BUFFER_SIZE) { |
258 | ACPI_REPORT_ERROR(("SMBus write requires Buffer of length %X, found length %X\n", ACPI_SMBUS_BUFFER_SIZE, source_desc->buffer.length)); | 260 | ACPI_ERROR((AE_INFO, |
261 | "SMBus write requires Buffer of length %X, found length %X", | ||
262 | ACPI_SMBUS_BUFFER_SIZE, | ||
263 | source_desc->buffer.length)); | ||
259 | 264 | ||
260 | return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); | 265 | return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); |
261 | } | 266 | } |
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index 9fe27fd04a2f..bd1af35f7fcf 100644 --- a/drivers/acpi/executer/exfldio.c +++ b/drivers/acpi/executer/exfldio.c | |||
@@ -94,9 +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_REPORT_ERROR(("Needed Region, found type %X (%s)\n", | 97 | ACPI_ERROR((AE_INFO, "Needed Region, found type %X (%s)", |
98 | ACPI_GET_OBJECT_TYPE(rgn_desc), | 98 | ACPI_GET_OBJECT_TYPE(rgn_desc), |
99 | acpi_ut_get_object_type_name(rgn_desc))); | 99 | acpi_ut_get_object_type_name(rgn_desc))); |
100 | 100 | ||
101 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 101 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
102 | } | 102 | } |
@@ -161,14 +161,28 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
161 | * than the region itself. For example, a region of length one | 161 | * than the region itself. For example, a region of length one |
162 | * byte, and a field with Dword access specified. | 162 | * byte, and a field with Dword access specified. |
163 | */ | 163 | */ |
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)); | 164 | ACPI_ERROR((AE_INFO, |
165 | "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)", | ||
166 | acpi_ut_get_node_name(obj_desc-> | ||
167 | common_field.node), | ||
168 | obj_desc->common_field.access_byte_width, | ||
169 | acpi_ut_get_node_name(rgn_desc->region. | ||
170 | node), | ||
171 | rgn_desc->region.length)); | ||
165 | } | 172 | } |
166 | 173 | ||
167 | /* | 174 | /* |
168 | * Offset rounded up to next multiple of field width | 175 | * Offset rounded up to next multiple of field width |
169 | * exceeds region length, indicate an error | 176 | * exceeds region length, indicate an error |
170 | */ | 177 | */ |
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)); | 178 | ACPI_ERROR((AE_INFO, |
179 | "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)", | ||
180 | acpi_ut_get_node_name(obj_desc->common_field.node), | ||
181 | obj_desc->common_field.base_byte_offset, | ||
182 | field_datum_byte_offset, | ||
183 | obj_desc->common_field.access_byte_width, | ||
184 | acpi_ut_get_node_name(rgn_desc->region.node), | ||
185 | rgn_desc->region.length)); | ||
172 | 186 | ||
173 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); | 187 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); |
174 | } | 188 | } |
@@ -252,17 +266,17 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, | |||
252 | 266 | ||
253 | if (ACPI_FAILURE(status)) { | 267 | if (ACPI_FAILURE(status)) { |
254 | if (status == AE_NOT_IMPLEMENTED) { | 268 | if (status == AE_NOT_IMPLEMENTED) { |
255 | ACPI_REPORT_ERROR(("Region %s(%X) not implemented\n", | 269 | ACPI_ERROR((AE_INFO, |
256 | acpi_ut_get_region_name(rgn_desc-> | 270 | "Region %s(%X) not implemented", |
257 | region. | 271 | acpi_ut_get_region_name(rgn_desc->region. |
258 | space_id), | 272 | space_id), |
259 | rgn_desc->region.space_id)); | 273 | rgn_desc->region.space_id)); |
260 | } else if (status == AE_NOT_EXIST) { | 274 | } else if (status == AE_NOT_EXIST) { |
261 | ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n", | 275 | ACPI_ERROR((AE_INFO, |
262 | acpi_ut_get_region_name(rgn_desc-> | 276 | "Region %s(%X) has no handler", |
263 | region. | 277 | acpi_ut_get_region_name(rgn_desc->region. |
264 | space_id), | 278 | space_id), |
265 | rgn_desc->region.space_id)); | 279 | rgn_desc->region.space_id)); |
266 | } | 280 | } |
267 | } | 281 | } |
268 | 282 | ||
@@ -495,8 +509,8 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, | |||
495 | 509 | ||
496 | default: | 510 | default: |
497 | 511 | ||
498 | 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", |
499 | ACPI_GET_OBJECT_TYPE(obj_desc))); | 513 | ACPI_GET_OBJECT_TYPE(obj_desc))); |
500 | status = AE_AML_INTERNAL; | 514 | status = AE_AML_INTERNAL; |
501 | break; | 515 | break; |
502 | } | 516 | } |
@@ -599,10 +613,11 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, | |||
599 | 613 | ||
600 | default: | 614 | default: |
601 | 615 | ||
602 | ACPI_REPORT_ERROR(("Unknown update_rule value: %X\n", | 616 | ACPI_ERROR((AE_INFO, |
603 | (obj_desc->common_field. | 617 | "Unknown update_rule value: %X", |
604 | field_flags & | 618 | (obj_desc->common_field. |
605 | AML_FIELD_UPDATE_RULE_MASK))); | 619 | field_flags & |
620 | AML_FIELD_UPDATE_RULE_MASK))); | ||
606 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 621 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
607 | } | 622 | } |
608 | } | 623 | } |
@@ -657,7 +672,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, | |||
657 | 672 | ||
658 | if (buffer_length < | 673 | if (buffer_length < |
659 | 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)) { |
660 | ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length)); | 675 | ACPI_ERROR((AE_INFO, |
676 | "Field size %X (bits) is too large for buffer (%X)", | ||
677 | obj_desc->common_field.bit_length, buffer_length)); | ||
661 | 678 | ||
662 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 679 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
663 | } | 680 | } |
@@ -769,7 +786,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
769 | 786 | ||
770 | if (buffer_length < | 787 | if (buffer_length < |
771 | 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)) { |
772 | ACPI_REPORT_ERROR(("Field size %X (bits) is too large for buffer (%X)\n", obj_desc->common_field.bit_length, buffer_length)); | 789 | ACPI_ERROR((AE_INFO, |
790 | "Field size %X (bits) is too large for buffer (%X)", | ||
791 | obj_desc->common_field.bit_length, buffer_length)); | ||
773 | 792 | ||
774 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 793 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
775 | } | 794 | } |
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index 5ad34566738c..48c18d29222a 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.c | |||
@@ -98,8 +98,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
98 | 98 | ||
99 | default: | 99 | default: |
100 | 100 | ||
101 | ACPI_REPORT_ERROR(("Unknown Reference opcode %X\n", | 101 | ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X", |
102 | obj_desc->reference.opcode)); | 102 | obj_desc->reference.opcode)); |
103 | return_ACPI_STATUS(AE_AML_INTERNAL); | 103 | return_ACPI_STATUS(AE_AML_INTERNAL); |
104 | } | 104 | } |
105 | break; | 105 | break; |
@@ -114,8 +114,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
114 | 114 | ||
115 | default: | 115 | default: |
116 | 116 | ||
117 | ACPI_REPORT_ERROR(("Invalid descriptor type %X\n", | 117 | ACPI_ERROR((AE_INFO, "Invalid descriptor type %X", |
118 | ACPI_GET_DESCRIPTOR_TYPE(obj_desc))); | 118 | ACPI_GET_DESCRIPTOR_TYPE(obj_desc))); |
119 | return_ACPI_STATUS(AE_TYPE); | 119 | return_ACPI_STATUS(AE_TYPE); |
120 | } | 120 | } |
121 | 121 | ||
@@ -166,15 +166,18 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
166 | u8 *end_tag; | 166 | u8 *end_tag; |
167 | acpi_size length0; | 167 | acpi_size length0; |
168 | acpi_size length1; | 168 | acpi_size length1; |
169 | acpi_size new_length; | ||
169 | 170 | ||
170 | ACPI_FUNCTION_TRACE("ex_concat_template"); | 171 | ACPI_FUNCTION_TRACE("ex_concat_template"); |
171 | 172 | ||
172 | /* | 173 | /* |
173 | * Find the end_tag descriptor in each resource template. | 174 | * Find the end_tag descriptor in each resource template. |
174 | * Note: returned pointers point TO the end_tag, not past it. | 175 | * Note1: returned pointers point TO the end_tag, not past it. |
175 | * | 176 | * Note2: zero-length buffers are allowed; treated like one end_tag |
176 | * Compute the length of each resource template | ||
177 | */ | 177 | */ |
178 | |||
179 | /* Get the length of the first resource template */ | ||
180 | |||
178 | status = acpi_ut_get_resource_end_tag(operand0, &end_tag); | 181 | status = acpi_ut_get_resource_end_tag(operand0, &end_tag); |
179 | if (ACPI_FAILURE(status)) { | 182 | if (ACPI_FAILURE(status)) { |
180 | return_ACPI_STATUS(status); | 183 | return_ACPI_STATUS(status); |
@@ -182,19 +185,22 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
182 | 185 | ||
183 | length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer); | 186 | length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer); |
184 | 187 | ||
188 | /* Get the length of the second resource template */ | ||
189 | |||
185 | status = acpi_ut_get_resource_end_tag(operand1, &end_tag); | 190 | status = acpi_ut_get_resource_end_tag(operand1, &end_tag); |
186 | if (ACPI_FAILURE(status)) { | 191 | if (ACPI_FAILURE(status)) { |
187 | return_ACPI_STATUS(status); | 192 | return_ACPI_STATUS(status); |
188 | } | 193 | } |
189 | 194 | ||
190 | /* Include the end_tag in the second template length */ | 195 | length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer); |
196 | |||
197 | /* Combine both lengths, minimum size will be 2 for end_tag */ | ||
191 | 198 | ||
192 | length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer) + | 199 | new_length = length0 + length1 + sizeof(struct aml_resource_end_tag); |
193 | sizeof(struct aml_resource_end_tag); | ||
194 | 200 | ||
195 | /* Create a new buffer object for the result */ | 201 | /* Create a new buffer object for the result (with one end_tag) */ |
196 | 202 | ||
197 | return_desc = acpi_ut_create_buffer_object(length0 + length1); | 203 | return_desc = acpi_ut_create_buffer_object(new_length); |
198 | if (!return_desc) { | 204 | if (!return_desc) { |
199 | return_ACPI_STATUS(AE_NO_MEMORY); | 205 | return_ACPI_STATUS(AE_NO_MEMORY); |
200 | } | 206 | } |
@@ -207,9 +213,10 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
207 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); | 213 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); |
208 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); | 214 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); |
209 | 215 | ||
210 | /* Set the end_tag checksum to zero, means "ignore checksum" */ | 216 | /* Insert end_tag and set the checksum to zero, means "ignore checksum" */ |
211 | 217 | ||
212 | new_buf[return_desc->buffer.length - 1] = 0; | 218 | new_buf[new_length - 1] = 0; |
219 | new_buf[new_length - 2] = ACPI_RESOURCE_NAME_END_TAG | 1; | ||
213 | 220 | ||
214 | /* Return the completed resource template */ | 221 | /* Return the completed resource template */ |
215 | 222 | ||
@@ -268,8 +275,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
268 | break; | 275 | break; |
269 | 276 | ||
270 | default: | 277 | default: |
271 | ACPI_REPORT_ERROR(("Invalid object type: %X\n", | 278 | ACPI_ERROR((AE_INFO, "Invalid object type: %X", |
272 | ACPI_GET_OBJECT_TYPE(operand0))); | 279 | ACPI_GET_OBJECT_TYPE(operand0))); |
273 | status = AE_AML_INTERNAL; | 280 | status = AE_AML_INTERNAL; |
274 | } | 281 | } |
275 | 282 | ||
@@ -370,8 +377,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
370 | 377 | ||
371 | /* Invalid object type, should not happen here */ | 378 | /* Invalid object type, should not happen here */ |
372 | 379 | ||
373 | ACPI_REPORT_ERROR(("Invalid object type: %X\n", | 380 | ACPI_ERROR((AE_INFO, "Invalid object type: %X", |
374 | ACPI_GET_OBJECT_TYPE(operand0))); | 381 | ACPI_GET_OBJECT_TYPE(operand0))); |
375 | status = AE_AML_INTERNAL; | 382 | status = AE_AML_INTERNAL; |
376 | goto cleanup; | 383 | goto cleanup; |
377 | } | 384 | } |
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index 89b8ab79410b..f843b22e20b9 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.c | |||
@@ -153,7 +153,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, | |||
153 | /* Sanity check -- we must have a valid thread ID */ | 153 | /* Sanity check -- we must have a valid thread ID */ |
154 | 154 | ||
155 | if (!walk_state->thread) { | 155 | if (!walk_state->thread) { |
156 | ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 156 | ACPI_ERROR((AE_INFO, |
157 | "Cannot acquire Mutex [%4.4s], null thread info", | ||
158 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
157 | return_ACPI_STATUS(AE_AML_INTERNAL); | 159 | return_ACPI_STATUS(AE_AML_INTERNAL); |
158 | } | 160 | } |
159 | 161 | ||
@@ -162,7 +164,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, | |||
162 | * mutex. This mechanism provides some deadlock prevention | 164 | * mutex. This mechanism provides some deadlock prevention |
163 | */ | 165 | */ |
164 | if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { | 166 | if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { |
165 | ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 167 | ACPI_ERROR((AE_INFO, |
168 | "Cannot acquire Mutex [%4.4s], incorrect sync_level", | ||
169 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
166 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); | 170 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); |
167 | } | 171 | } |
168 | 172 | ||
@@ -237,14 +241,18 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
237 | /* The mutex must have been previously acquired in order to release it */ | 241 | /* The mutex must have been previously acquired in order to release it */ |
238 | 242 | ||
239 | if (!obj_desc->mutex.owner_thread) { | 243 | if (!obj_desc->mutex.owner_thread) { |
240 | ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], not acquired\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 244 | ACPI_ERROR((AE_INFO, |
245 | "Cannot release Mutex [%4.4s], not acquired", | ||
246 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
241 | return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); | 247 | return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); |
242 | } | 248 | } |
243 | 249 | ||
244 | /* Sanity check -- we must have a valid thread ID */ | 250 | /* Sanity check -- we must have a valid thread ID */ |
245 | 251 | ||
246 | if (!walk_state->thread) { | 252 | if (!walk_state->thread) { |
247 | ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 253 | ACPI_ERROR((AE_INFO, |
254 | "Cannot release Mutex [%4.4s], null thread info", | ||
255 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
248 | return_ACPI_STATUS(AE_AML_INTERNAL); | 256 | return_ACPI_STATUS(AE_AML_INTERNAL); |
249 | } | 257 | } |
250 | 258 | ||
@@ -255,7 +263,11 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
255 | if ((obj_desc->mutex.owner_thread->thread_id != | 263 | if ((obj_desc->mutex.owner_thread->thread_id != |
256 | walk_state->thread->thread_id) | 264 | walk_state->thread->thread_id) |
257 | && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { | 265 | && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { |
258 | ACPI_REPORT_ERROR(("Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n", walk_state->thread->thread_id, acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.owner_thread->thread_id)); | 266 | ACPI_ERROR((AE_INFO, |
267 | "Thread %X cannot release Mutex [%4.4s] acquired by thread %X", | ||
268 | walk_state->thread->thread_id, | ||
269 | acpi_ut_get_node_name(obj_desc->mutex.node), | ||
270 | obj_desc->mutex.owner_thread->thread_id)); | ||
259 | return_ACPI_STATUS(AE_AML_NOT_OWNER); | 271 | return_ACPI_STATUS(AE_AML_NOT_OWNER); |
260 | } | 272 | } |
261 | 273 | ||
@@ -264,7 +276,9 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
264 | * equal to the current sync level | 276 | * equal to the current sync level |
265 | */ | 277 | */ |
266 | if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { | 278 | if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { |
267 | ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 279 | ACPI_ERROR((AE_INFO, |
280 | "Cannot release Mutex [%4.4s], incorrect sync_level", | ||
281 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
268 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); | 282 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); |
269 | } | 283 | } |
270 | 284 | ||
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index de3216b6a4fc..054fe5e1a314 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.c | |||
@@ -99,8 +99,8 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) | |||
99 | */ | 99 | */ |
100 | name_string = ACPI_MEM_ALLOCATE(size_needed); | 100 | name_string = ACPI_MEM_ALLOCATE(size_needed); |
101 | if (!name_string) { | 101 | if (!name_string) { |
102 | ACPI_REPORT_ERROR(("Could not allocate size %d\n", | 102 | ACPI_ERROR((AE_INFO, |
103 | size_needed)); | 103 | "Could not allocate size %d", size_needed)); |
104 | return_PTR(NULL); | 104 | return_PTR(NULL); |
105 | } | 105 | } |
106 | 106 | ||
@@ -168,7 +168,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
168 | char_buf[0] = *aml_address; | 168 | char_buf[0] = *aml_address; |
169 | 169 | ||
170 | if ('0' <= char_buf[0] && char_buf[0] <= '9') { | 170 | if ('0' <= char_buf[0] && char_buf[0] <= '9') { |
171 | ACPI_REPORT_ERROR(("Invalid leading digit: %c\n", char_buf[0])); | 171 | ACPI_ERROR((AE_INFO, "Invalid leading digit: %c", char_buf[0])); |
172 | return_ACPI_STATUS(AE_CTRL_PENDING); | 172 | return_ACPI_STATUS(AE_CTRL_PENDING); |
173 | } | 173 | } |
174 | 174 | ||
@@ -211,8 +211,9 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
211 | * the required 4 | 211 | * the required 4 |
212 | */ | 212 | */ |
213 | status = AE_AML_BAD_NAME; | 213 | status = AE_AML_BAD_NAME; |
214 | ACPI_REPORT_ERROR(("Bad character %02x in name, at %p\n", | 214 | ACPI_ERROR((AE_INFO, |
215 | *aml_address, aml_address)); | 215 | "Bad character %02x in name, at %p", |
216 | *aml_address, aml_address)); | ||
216 | } | 217 | } |
217 | 218 | ||
218 | *in_aml_address = ACPI_CAST_PTR(u8, aml_address); | 219 | *in_aml_address = ACPI_CAST_PTR(u8, aml_address); |
@@ -411,7 +412,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, | |||
411 | if (AE_CTRL_PENDING == status && has_prefix) { | 412 | if (AE_CTRL_PENDING == status && has_prefix) { |
412 | /* Ran out of segments after processing a prefix */ | 413 | /* Ran out of segments after processing a prefix */ |
413 | 414 | ||
414 | ACPI_REPORT_ERROR(("Malformed Name at %p\n", name_string)); | 415 | ACPI_ERROR((AE_INFO, "Malformed Name at %p", name_string)); |
415 | status = AE_AML_BAD_NAME; | 416 | status = AE_AML_BAD_NAME; |
416 | } | 417 | } |
417 | 418 | ||
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index bc8837ecb716..23d0823bcd5e 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -111,8 +111,8 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) | |||
111 | 111 | ||
112 | default: /* Unknown opcode */ | 112 | default: /* Unknown opcode */ |
113 | 113 | ||
114 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 114 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
115 | walk_state->opcode)); | 115 | walk_state->opcode)); |
116 | status = AE_AML_BAD_OPCODE; | 116 | status = AE_AML_BAD_OPCODE; |
117 | break; | 117 | break; |
118 | } | 118 | } |
@@ -189,8 +189,8 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) | |||
189 | 189 | ||
190 | default: /* Unknown opcode */ | 190 | default: /* Unknown opcode */ |
191 | 191 | ||
192 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 192 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
193 | walk_state->opcode)); | 193 | walk_state->opcode)); |
194 | status = AE_AML_BAD_OPCODE; | 194 | status = AE_AML_BAD_OPCODE; |
195 | break; | 195 | break; |
196 | } | 196 | } |
@@ -229,8 +229,8 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) | |||
229 | 229 | ||
230 | default: /* Unknown opcode */ | 230 | default: /* Unknown opcode */ |
231 | 231 | ||
232 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 232 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
233 | walk_state->opcode)); | 233 | walk_state->opcode)); |
234 | status = AE_AML_BAD_OPCODE; | 234 | status = AE_AML_BAD_OPCODE; |
235 | goto cleanup; | 235 | goto cleanup; |
236 | } | 236 | } |
@@ -349,7 +349,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
349 | /* Check the range of the digit */ | 349 | /* Check the range of the digit */ |
350 | 350 | ||
351 | if (temp32 > 9) { | 351 | if (temp32 > 9) { |
352 | ACPI_REPORT_ERROR(("BCD digit too large (not decimal): 0x%X\n", temp32)); | 352 | ACPI_ERROR((AE_INFO, |
353 | "BCD digit too large (not decimal): 0x%X", | ||
354 | temp32)); | ||
353 | 355 | ||
354 | status = AE_AML_NUMERIC_OVERFLOW; | 356 | status = AE_AML_NUMERIC_OVERFLOW; |
355 | goto cleanup; | 357 | goto cleanup; |
@@ -394,7 +396,10 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
394 | /* Overflow if there is any data left in Digit */ | 396 | /* Overflow if there is any data left in Digit */ |
395 | 397 | ||
396 | if (digit > 0) { | 398 | if (digit > 0) { |
397 | ACPI_REPORT_ERROR(("Integer too large to convert to BCD: %8.8X%8.8X\n", ACPI_FORMAT_UINT64(operand[0]->integer.value))); | 399 | ACPI_ERROR((AE_INFO, |
400 | "Integer too large to convert to BCD: %8.8X%8.8X", | ||
401 | ACPI_FORMAT_UINT64(operand[0]-> | ||
402 | integer.value))); | ||
398 | status = AE_AML_NUMERIC_OVERFLOW; | 403 | status = AE_AML_NUMERIC_OVERFLOW; |
399 | goto cleanup; | 404 | goto cleanup; |
400 | } | 405 | } |
@@ -521,16 +526,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
521 | 526 | ||
522 | /* These are two obsolete opcodes */ | 527 | /* These are two obsolete opcodes */ |
523 | 528 | ||
524 | ACPI_REPORT_ERROR(("%s is obsolete and not implemented\n", | 529 | ACPI_ERROR((AE_INFO, |
525 | acpi_ps_get_opcode_name(walk_state-> | 530 | "%s is obsolete and not implemented", |
526 | opcode))); | 531 | acpi_ps_get_opcode_name(walk_state->opcode))); |
527 | status = AE_SUPPORT; | 532 | status = AE_SUPPORT; |
528 | goto cleanup; | 533 | goto cleanup; |
529 | 534 | ||
530 | default: /* Unknown opcode */ | 535 | default: /* Unknown opcode */ |
531 | 536 | ||
532 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 537 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
533 | walk_state->opcode)); | 538 | walk_state->opcode)); |
534 | status = AE_AML_BAD_OPCODE; | 539 | status = AE_AML_BAD_OPCODE; |
535 | goto cleanup; | 540 | goto cleanup; |
536 | } | 541 | } |
@@ -636,10 +641,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
636 | acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, | 641 | acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, |
637 | walk_state); | 642 | walk_state); |
638 | if (ACPI_FAILURE(status)) { | 643 | if (ACPI_FAILURE(status)) { |
639 | ACPI_REPORT_ERROR(("%s: bad operand(s) %s\n", | 644 | ACPI_EXCEPTION((AE_INFO, status, |
640 | acpi_ps_get_opcode_name(walk_state-> | 645 | "While resolving operands for [%s]", |
641 | opcode), | 646 | acpi_ps_get_opcode_name(walk_state-> |
642 | acpi_format_exception(status))); | 647 | opcode))); |
643 | 648 | ||
644 | goto cleanup; | 649 | goto cleanup; |
645 | } | 650 | } |
@@ -738,7 +743,9 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
738 | break; | 743 | break; |
739 | 744 | ||
740 | default: | 745 | default: |
741 | ACPI_REPORT_ERROR(("Operand is not Buf/Int/Str/Pkg - found type %s\n", acpi_ut_get_type_name(type))); | 746 | ACPI_ERROR((AE_INFO, |
747 | "Operand is not Buf/Int/Str/Pkg - found type %s", | ||
748 | acpi_ut_get_type_name(type))); | ||
742 | status = AE_AML_OPERAND_TYPE; | 749 | status = AE_AML_OPERAND_TYPE; |
743 | goto cleanup; | 750 | goto cleanup; |
744 | } | 751 | } |
@@ -935,7 +942,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
935 | 942 | ||
936 | default: | 943 | default: |
937 | 944 | ||
938 | ACPI_REPORT_ERROR(("Unknown Index target_type %X in obj %p\n", operand[0]->reference.target_type, operand[0])); | 945 | ACPI_ERROR((AE_INFO, |
946 | "Unknown Index target_type %X in obj %p", | ||
947 | operand[0]->reference. | ||
948 | target_type, operand[0])); | ||
939 | status = AE_AML_OPERAND_TYPE; | 949 | status = AE_AML_OPERAND_TYPE; |
940 | goto cleanup; | 950 | goto cleanup; |
941 | } | 951 | } |
@@ -961,7 +971,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
961 | break; | 971 | break; |
962 | 972 | ||
963 | default: | 973 | default: |
964 | ACPI_REPORT_ERROR(("Unknown opcode in ref(%p) - %X\n", operand[0], operand[0]->reference.opcode)); | 974 | ACPI_ERROR((AE_INFO, |
975 | "Unknown opcode in ref(%p) - %X", | ||
976 | operand[0], | ||
977 | operand[0]->reference.opcode)); | ||
965 | 978 | ||
966 | status = AE_TYPE; | 979 | status = AE_TYPE; |
967 | goto cleanup; | 980 | goto cleanup; |
@@ -971,8 +984,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
971 | 984 | ||
972 | default: | 985 | default: |
973 | 986 | ||
974 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 987 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
975 | walk_state->opcode)); | 988 | walk_state->opcode)); |
976 | status = AE_AML_BAD_OPCODE; | 989 | status = AE_AML_BAD_OPCODE; |
977 | goto cleanup; | 990 | goto cleanup; |
978 | } | 991 | } |
diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c index 7c59dda40946..e263a5ddd405 100644 --- a/drivers/acpi/executer/exoparg2.c +++ b/drivers/acpi/executer/exoparg2.c | |||
@@ -111,7 +111,9 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) | |||
111 | /* Are notifies allowed on this object? */ | 111 | /* Are notifies allowed on this object? */ |
112 | 112 | ||
113 | if (!acpi_ev_is_notify_object(node)) { | 113 | if (!acpi_ev_is_notify_object(node)) { |
114 | ACPI_REPORT_ERROR(("Unexpected notify object type [%s]\n", acpi_ut_get_type_name(node->type))); | 114 | ACPI_ERROR((AE_INFO, |
115 | "Unexpected notify object type [%s]", | ||
116 | acpi_ut_get_type_name(node->type))); | ||
115 | 117 | ||
116 | status = AE_AML_OPERAND_TYPE; | 118 | status = AE_AML_OPERAND_TYPE; |
117 | break; | 119 | break; |
@@ -155,8 +157,8 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) | |||
155 | 157 | ||
156 | default: | 158 | default: |
157 | 159 | ||
158 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 160 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
159 | walk_state->opcode)); | 161 | walk_state->opcode)); |
160 | status = AE_AML_BAD_OPCODE; | 162 | status = AE_AML_BAD_OPCODE; |
161 | } | 163 | } |
162 | 164 | ||
@@ -220,8 +222,8 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state) | |||
220 | 222 | ||
221 | default: | 223 | default: |
222 | 224 | ||
223 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 225 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
224 | walk_state->opcode)); | 226 | walk_state->opcode)); |
225 | status = AE_AML_BAD_OPCODE; | 227 | status = AE_AML_BAD_OPCODE; |
226 | goto cleanup; | 228 | goto cleanup; |
227 | } | 229 | } |
@@ -389,7 +391,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
389 | /* Object to be indexed is a Package */ | 391 | /* Object to be indexed is a Package */ |
390 | 392 | ||
391 | if (index >= operand[0]->package.count) { | 393 | if (index >= operand[0]->package.count) { |
392 | ACPI_REPORT_ERROR(("Index value (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->package.count)); | 394 | ACPI_ERROR((AE_INFO, |
395 | "Index value (%X%8.8X) beyond package end (%X)", | ||
396 | ACPI_FORMAT_UINT64(index), | ||
397 | operand[0]->package.count)); | ||
393 | status = AE_AML_PACKAGE_LIMIT; | 398 | status = AE_AML_PACKAGE_LIMIT; |
394 | goto cleanup; | 399 | goto cleanup; |
395 | } | 400 | } |
@@ -402,7 +407,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
402 | /* Object to be indexed is a Buffer/String */ | 407 | /* Object to be indexed is a Buffer/String */ |
403 | 408 | ||
404 | if (index >= operand[0]->buffer.length) { | 409 | if (index >= operand[0]->buffer.length) { |
405 | ACPI_REPORT_ERROR(("Index value (%X%8.8X) beyond end of buffer (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->buffer.length)); | 410 | ACPI_ERROR((AE_INFO, |
411 | "Index value (%X%8.8X) beyond end of buffer (%X)", | ||
412 | ACPI_FORMAT_UINT64(index), | ||
413 | operand[0]->buffer.length)); | ||
406 | status = AE_AML_BUFFER_LIMIT; | 414 | status = AE_AML_BUFFER_LIMIT; |
407 | goto cleanup; | 415 | goto cleanup; |
408 | } | 416 | } |
@@ -434,8 +442,8 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
434 | 442 | ||
435 | default: | 443 | default: |
436 | 444 | ||
437 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 445 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
438 | walk_state->opcode)); | 446 | walk_state->opcode)); |
439 | status = AE_AML_BAD_OPCODE; | 447 | status = AE_AML_BAD_OPCODE; |
440 | break; | 448 | break; |
441 | } | 449 | } |
@@ -539,8 +547,8 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state) | |||
539 | 547 | ||
540 | default: | 548 | default: |
541 | 549 | ||
542 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 550 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
543 | walk_state->opcode)); | 551 | walk_state->opcode)); |
544 | status = AE_AML_BAD_OPCODE; | 552 | status = AE_AML_BAD_OPCODE; |
545 | goto cleanup; | 553 | goto cleanup; |
546 | } | 554 | } |
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index a979b338a491..6a3a883cb8a3 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.c | |||
@@ -119,8 +119,8 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) | |||
119 | 119 | ||
120 | default: | 120 | default: |
121 | 121 | ||
122 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 122 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
123 | walk_state->opcode)); | 123 | walk_state->opcode)); |
124 | status = AE_AML_BAD_OPCODE; | 124 | status = AE_AML_BAD_OPCODE; |
125 | goto cleanup; | 125 | goto cleanup; |
126 | } | 126 | } |
@@ -243,8 +243,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
243 | 243 | ||
244 | default: | 244 | default: |
245 | 245 | ||
246 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 246 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
247 | walk_state->opcode)); | 247 | walk_state->opcode)); |
248 | status = AE_AML_BAD_OPCODE; | 248 | status = AE_AML_BAD_OPCODE; |
249 | goto cleanup; | 249 | goto cleanup; |
250 | } | 250 | } |
diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c index 05e7f9b67f29..e043d924444f 100644 --- a/drivers/acpi/executer/exoparg6.c +++ b/drivers/acpi/executer/exoparg6.c | |||
@@ -234,7 +234,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
234 | 234 | ||
235 | if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || | 235 | if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || |
236 | (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { | 236 | (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { |
237 | ACPI_REPORT_ERROR(("Match operator out of range\n")); | 237 | ACPI_ERROR((AE_INFO, "Match operator out of range")); |
238 | status = AE_AML_OPERAND_VALUE; | 238 | status = AE_AML_OPERAND_VALUE; |
239 | goto cleanup; | 239 | goto cleanup; |
240 | } | 240 | } |
@@ -243,7 +243,10 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
243 | 243 | ||
244 | index = operand[5]->integer.value; | 244 | index = operand[5]->integer.value; |
245 | if (index >= operand[0]->package.count) { | 245 | if (index >= operand[0]->package.count) { |
246 | ACPI_REPORT_ERROR(("Index (%X%8.8X) beyond package end (%X)\n", ACPI_FORMAT_UINT64(index), operand[0]->package.count)); | 246 | ACPI_ERROR((AE_INFO, |
247 | "Index (%X%8.8X) beyond package end (%X)", | ||
248 | ACPI_FORMAT_UINT64(index), | ||
249 | operand[0]->package.count)); | ||
247 | status = AE_AML_PACKAGE_LIMIT; | 250 | status = AE_AML_PACKAGE_LIMIT; |
248 | goto cleanup; | 251 | goto cleanup; |
249 | } | 252 | } |
@@ -312,8 +315,8 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
312 | 315 | ||
313 | default: | 316 | default: |
314 | 317 | ||
315 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", | 318 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
316 | walk_state->opcode)); | 319 | walk_state->opcode)); |
317 | status = AE_AML_BAD_OPCODE; | 320 | status = AE_AML_BAD_OPCODE; |
318 | goto cleanup; | 321 | goto cleanup; |
319 | } | 322 | } |
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c index 3bde780c94cf..7719ae5d4f16 100644 --- a/drivers/acpi/executer/exprep.c +++ b/drivers/acpi/executer/exprep.c | |||
@@ -274,7 +274,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
274 | default: | 274 | default: |
275 | /* Invalid field access type */ | 275 | /* Invalid field access type */ |
276 | 276 | ||
277 | ACPI_REPORT_ERROR(("Unknown field access type %X\n", access)); | 277 | ACPI_ERROR((AE_INFO, "Unknown field access type %X", access)); |
278 | return_UINT32(0); | 278 | return_UINT32(0); |
279 | } | 279 | } |
280 | 280 | ||
@@ -421,13 +421,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
421 | 421 | ||
422 | if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { | 422 | if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { |
423 | if (!info->region_node) { | 423 | if (!info->region_node) { |
424 | ACPI_REPORT_ERROR(("Null region_node\n")); | 424 | ACPI_ERROR((AE_INFO, "Null region_node")); |
425 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 425 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
426 | } | 426 | } |
427 | 427 | ||
428 | type = acpi_ns_get_type(info->region_node); | 428 | type = acpi_ns_get_type(info->region_node); |
429 | if (type != ACPI_TYPE_REGION) { | 429 | if (type != ACPI_TYPE_REGION) { |
430 | ACPI_REPORT_ERROR(("Needed Region, found type %X (%s)\n", type, acpi_ut_get_type_name(type))); | 430 | ACPI_ERROR((AE_INFO, |
431 | "Needed Region, found type %X (%s)", | ||
432 | type, acpi_ut_get_type_name(type))); | ||
431 | 433 | ||
432 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 434 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
433 | } | 435 | } |
@@ -496,17 +498,17 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
496 | 498 | ||
497 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | 499 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
498 | 500 | ||
501 | /* Get the Index and Data registers */ | ||
502 | |||
499 | obj_desc->index_field.index_obj = | 503 | obj_desc->index_field.index_obj = |
500 | acpi_ns_get_attached_object(info->register_node); | 504 | acpi_ns_get_attached_object(info->register_node); |
501 | obj_desc->index_field.data_obj = | 505 | obj_desc->index_field.data_obj = |
502 | acpi_ns_get_attached_object(info->data_register_node); | 506 | acpi_ns_get_attached_object(info->data_register_node); |
503 | obj_desc->index_field.value = (u32) | ||
504 | (info->field_bit_position / | ||
505 | ACPI_MUL_8(obj_desc->field.access_byte_width)); | ||
506 | 507 | ||
507 | if (!obj_desc->index_field.data_obj | 508 | if (!obj_desc->index_field.data_obj |
508 | || !obj_desc->index_field.index_obj) { | 509 | || !obj_desc->index_field.index_obj) { |
509 | ACPI_REPORT_ERROR(("Null Index Object during field prep\n")); | 510 | ACPI_ERROR((AE_INFO, |
511 | "Null Index Object during field prep")); | ||
510 | acpi_ut_delete_object_desc(obj_desc); | 512 | acpi_ut_delete_object_desc(obj_desc); |
511 | return_ACPI_STATUS(AE_AML_INTERNAL); | 513 | return_ACPI_STATUS(AE_AML_INTERNAL); |
512 | } | 514 | } |
@@ -516,6 +518,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
516 | acpi_ut_add_reference(obj_desc->index_field.data_obj); | 518 | acpi_ut_add_reference(obj_desc->index_field.data_obj); |
517 | acpi_ut_add_reference(obj_desc->index_field.index_obj); | 519 | acpi_ut_add_reference(obj_desc->index_field.index_obj); |
518 | 520 | ||
521 | /* | ||
522 | * The value written to the Index register is the byte offset of the | ||
523 | * target field | ||
524 | * Note: may change code to: ACPI_DIV_8 (Info->field_bit_position) | ||
525 | */ | ||
526 | obj_desc->index_field.value = (u32) | ||
527 | (info->field_bit_position / | ||
528 | ACPI_MUL_8(obj_desc->field.access_byte_width)); | ||
529 | |||
519 | ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, | 530 | ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, |
520 | "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", | 531 | "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", |
521 | obj_desc->index_field.start_field_bit_offset, | 532 | obj_desc->index_field.start_field_bit_offset, |
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 82983575cca6..6a4cfdff606d 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c | |||
@@ -103,8 +103,8 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
103 | break; | 103 | break; |
104 | 104 | ||
105 | default: | 105 | default: |
106 | ACPI_REPORT_ERROR(("Invalid system_memory width %d\n", | 106 | ACPI_ERROR((AE_INFO, "Invalid system_memory width %d", |
107 | bit_width)); | 107 | bit_width)); |
108 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 108 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
109 | } | 109 | } |
110 | 110 | ||
@@ -158,7 +158,10 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
158 | (void **)&mem_info-> | 158 | (void **)&mem_info-> |
159 | mapped_logical_address); | 159 | mapped_logical_address); |
160 | if (ACPI_FAILURE(status)) { | 160 | if (ACPI_FAILURE(status)) { |
161 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X%8.8X, size %X\n", ACPI_FORMAT_UINT64(address), (u32) window_size)); | 161 | ACPI_ERROR((AE_INFO, |
162 | "Could not map memory at %8.8X%8.8X, size %X", | ||
163 | ACPI_FORMAT_UINT64(address), | ||
164 | (u32) window_size)); | ||
162 | mem_info->mapped_length = 0; | 165 | mem_info->mapped_length = 0; |
163 | return_ACPI_STATUS(status); | 166 | return_ACPI_STATUS(status); |
164 | } | 167 | } |
diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index a5cca7eda210..01b26c80d22b 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.c | |||
@@ -122,7 +122,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
122 | } | 122 | } |
123 | 123 | ||
124 | if (!source_desc) { | 124 | if (!source_desc) { |
125 | ACPI_REPORT_ERROR(("No object attached to node %p\n", node)); | 125 | ACPI_ERROR((AE_INFO, "No object attached to node %p", node)); |
126 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 126 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
127 | } | 127 | } |
128 | 128 | ||
@@ -134,9 +134,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
134 | case ACPI_TYPE_PACKAGE: | 134 | case ACPI_TYPE_PACKAGE: |
135 | 135 | ||
136 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { | 136 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { |
137 | ACPI_REPORT_ERROR(("Object not a Package, type %s\n", | 137 | ACPI_ERROR((AE_INFO, "Object not a Package, type %s", |
138 | acpi_ut_get_object_type_name | 138 | acpi_ut_get_object_type_name(source_desc))); |
139 | (source_desc))); | ||
140 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 139 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
141 | } | 140 | } |
142 | 141 | ||
@@ -152,9 +151,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
152 | case ACPI_TYPE_BUFFER: | 151 | case ACPI_TYPE_BUFFER: |
153 | 152 | ||
154 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { | 153 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { |
155 | ACPI_REPORT_ERROR(("Object not a Buffer, type %s\n", | 154 | ACPI_ERROR((AE_INFO, "Object not a Buffer, type %s", |
156 | acpi_ut_get_object_type_name | 155 | acpi_ut_get_object_type_name(source_desc))); |
157 | (source_desc))); | ||
158 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 156 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
159 | } | 157 | } |
160 | 158 | ||
@@ -170,9 +168,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
170 | case ACPI_TYPE_STRING: | 168 | case ACPI_TYPE_STRING: |
171 | 169 | ||
172 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { | 170 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { |
173 | ACPI_REPORT_ERROR(("Object not a String, type %s\n", | 171 | ACPI_ERROR((AE_INFO, "Object not a String, type %s", |
174 | acpi_ut_get_object_type_name | 172 | acpi_ut_get_object_type_name(source_desc))); |
175 | (source_desc))); | ||
176 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 173 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
177 | } | 174 | } |
178 | 175 | ||
@@ -185,9 +182,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
185 | case ACPI_TYPE_INTEGER: | 182 | case ACPI_TYPE_INTEGER: |
186 | 183 | ||
187 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { | 184 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { |
188 | ACPI_REPORT_ERROR(("Object not a Integer, type %s\n", | 185 | ACPI_ERROR((AE_INFO, "Object not a Integer, type %s", |
189 | acpi_ut_get_object_type_name | 186 | acpi_ut_get_object_type_name(source_desc))); |
190 | (source_desc))); | ||
191 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 187 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
192 | } | 188 | } |
193 | 189 | ||
@@ -231,8 +227,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
231 | 227 | ||
232 | case ACPI_TYPE_ANY: | 228 | case ACPI_TYPE_ANY: |
233 | 229 | ||
234 | ACPI_REPORT_ERROR(("Untyped entry %p, no attached object!\n", | 230 | ACPI_ERROR((AE_INFO, |
235 | node)); | 231 | "Untyped entry %p, no attached object!", node)); |
236 | 232 | ||
237 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */ | 233 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */ |
238 | 234 | ||
@@ -251,7 +247,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
251 | default: | 247 | default: |
252 | /* No named references are allowed here */ | 248 | /* No named references are allowed here */ |
253 | 249 | ||
254 | ACPI_REPORT_ERROR(("Unsupported Reference opcode %X (%s)\n", source_desc->reference.opcode, acpi_ps_get_opcode_name(source_desc->reference.opcode))); | 250 | ACPI_ERROR((AE_INFO, |
251 | "Unsupported Reference opcode %X (%s)", | ||
252 | source_desc->reference.opcode, | ||
253 | acpi_ps_get_opcode_name(source_desc-> | ||
254 | reference.opcode))); | ||
255 | 255 | ||
256 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 256 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
257 | } | 257 | } |
@@ -261,8 +261,9 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
261 | 261 | ||
262 | /* Default case is for unknown types */ | 262 | /* Default case is for unknown types */ |
263 | 263 | ||
264 | ACPI_REPORT_ERROR(("Node %p - Unknown object type %X\n", | 264 | ACPI_ERROR((AE_INFO, |
265 | node, entry_type)); | 265 | "Node %p - Unknown object type %X", |
266 | node, entry_type)); | ||
266 | 267 | ||
267 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 268 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
268 | 269 | ||
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index ae2d2da00844..1deed492fe88 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.c | |||
@@ -81,7 +81,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, | |||
81 | ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); | 81 | ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); |
82 | 82 | ||
83 | if (!stack_ptr || !*stack_ptr) { | 83 | if (!stack_ptr || !*stack_ptr) { |
84 | ACPI_REPORT_ERROR(("Internal - null pointer\n")); | 84 | ACPI_ERROR((AE_INFO, "Internal - null pointer")); |
85 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 85 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
86 | } | 86 | } |
87 | 87 | ||
@@ -97,7 +97,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, | |||
97 | } | 97 | } |
98 | 98 | ||
99 | if (!*stack_ptr) { | 99 | if (!*stack_ptr) { |
100 | ACPI_REPORT_ERROR(("Internal - null pointer\n")); | 100 | ACPI_ERROR((AE_INFO, "Internal - null pointer")); |
101 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 101 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
102 | } | 102 | } |
103 | } | 103 | } |
@@ -227,7 +227,9 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
227 | * A NULL object descriptor means an unitialized element of | 227 | * A NULL object descriptor means an unitialized element of |
228 | * the package, can't dereference it | 228 | * the package, can't dereference it |
229 | */ | 229 | */ |
230 | ACPI_REPORT_ERROR(("Attempt to deref an Index to NULL pkg element Idx=%p\n", stack_desc)); | 230 | ACPI_ERROR((AE_INFO, |
231 | "Attempt to deref an Index to NULL pkg element Idx=%p", | ||
232 | stack_desc)); | ||
231 | status = AE_AML_UNINITIALIZED_ELEMENT; | 233 | status = AE_AML_UNINITIALIZED_ELEMENT; |
232 | } | 234 | } |
233 | break; | 235 | break; |
@@ -236,7 +238,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
236 | 238 | ||
237 | /* Invalid reference object */ | 239 | /* Invalid reference object */ |
238 | 240 | ||
239 | ACPI_REPORT_ERROR(("Unknown target_type %X in Index/Reference obj %p\n", stack_desc->reference.target_type, stack_desc)); | 241 | ACPI_ERROR((AE_INFO, |
242 | "Unknown target_type %X in Index/Reference obj %p", | ||
243 | stack_desc->reference.target_type, | ||
244 | stack_desc)); | ||
240 | status = AE_AML_INTERNAL; | 245 | status = AE_AML_INTERNAL; |
241 | break; | 246 | break; |
242 | } | 247 | } |
@@ -261,7 +266,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
261 | 266 | ||
262 | default: | 267 | default: |
263 | 268 | ||
264 | ACPI_REPORT_ERROR(("Unknown Reference opcode %X (%s) in %p\n", opcode, acpi_ps_get_opcode_name(opcode), stack_desc)); | 269 | ACPI_ERROR((AE_INFO, |
270 | "Unknown Reference opcode %X (%s) in %p", | ||
271 | opcode, acpi_ps_get_opcode_name(opcode), | ||
272 | stack_desc)); | ||
265 | status = AE_AML_INTERNAL; | 273 | status = AE_AML_INTERNAL; |
266 | break; | 274 | break; |
267 | } | 275 | } |
@@ -383,10 +391,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
383 | 391 | ||
384 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != | 392 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != |
385 | ACPI_DESC_TYPE_NAMED) { | 393 | ACPI_DESC_TYPE_NAMED) { |
386 | ACPI_REPORT_ERROR(("Not a NS node %p [%s]\n", | 394 | ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]", |
387 | node, | 395 | node, |
388 | acpi_ut_get_descriptor_name | 396 | acpi_ut_get_descriptor_name(node))); |
389 | (node))); | ||
390 | return_ACPI_STATUS(AE_AML_INTERNAL); | 397 | return_ACPI_STATUS(AE_AML_INTERNAL); |
391 | } | 398 | } |
392 | 399 | ||
@@ -442,10 +449,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
442 | 449 | ||
443 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != | 450 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != |
444 | ACPI_DESC_TYPE_NAMED) { | 451 | ACPI_DESC_TYPE_NAMED) { |
445 | ACPI_REPORT_ERROR(("Not a NS node %p [%s]\n", | 452 | ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]", |
446 | node, | 453 | node, |
447 | acpi_ut_get_descriptor_name | 454 | acpi_ut_get_descriptor_name(node))); |
448 | (node))); | ||
449 | return_ACPI_STATUS(AE_AML_INTERNAL); | 455 | return_ACPI_STATUS(AE_AML_INTERNAL); |
450 | } | 456 | } |
451 | 457 | ||
@@ -514,8 +520,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
514 | 520 | ||
515 | default: | 521 | default: |
516 | 522 | ||
517 | ACPI_REPORT_ERROR(("Unknown Reference subtype %X\n", | 523 | ACPI_ERROR((AE_INFO, |
518 | obj_desc->reference.opcode)); | 524 | "Unknown Reference subtype %X", |
525 | obj_desc->reference.opcode)); | ||
519 | return_ACPI_STATUS(AE_AML_INTERNAL); | 526 | return_ACPI_STATUS(AE_AML_INTERNAL); |
520 | } | 527 | } |
521 | } | 528 | } |
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index 804faebf825c..a1c000f5a415 100644 --- a/drivers/acpi/executer/exresop.c +++ b/drivers/acpi/executer/exresop.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
47 | #include <acpi/acparser.h> | 47 | #include <acpi/acparser.h> |
48 | #include <acpi/acinterp.h> | 48 | #include <acpi/acinterp.h> |
49 | #include <acpi/acnamesp.h> | ||
49 | 50 | ||
50 | #define _COMPONENT ACPI_EXECUTER | 51 | #define _COMPONENT ACPI_EXECUTER |
51 | ACPI_MODULE_NAME("exresop") | 52 | ACPI_MODULE_NAME("exresop") |
@@ -95,9 +96,10 @@ acpi_ex_check_object_type(acpi_object_type type_needed, | |||
95 | } | 96 | } |
96 | 97 | ||
97 | if (type_needed != this_type) { | 98 | if (type_needed != this_type) { |
98 | ACPI_REPORT_ERROR(("Needed type [%s], found [%s] %p\n", | 99 | ACPI_ERROR((AE_INFO, |
99 | acpi_ut_get_type_name(type_needed), | 100 | "Needed type [%s], found [%s] %p", |
100 | acpi_ut_get_type_name(this_type), object)); | 101 | acpi_ut_get_type_name(type_needed), |
102 | acpi_ut_get_type_name(this_type), object)); | ||
101 | 103 | ||
102 | return (AE_AML_OPERAND_TYPE); | 104 | return (AE_AML_OPERAND_TYPE); |
103 | } | 105 | } |
@@ -150,7 +152,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
150 | 152 | ||
151 | arg_types = op_info->runtime_args; | 153 | arg_types = op_info->runtime_args; |
152 | if (arg_types == ARGI_INVALID_OPCODE) { | 154 | if (arg_types == ARGI_INVALID_OPCODE) { |
153 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", opcode)); | 155 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", opcode)); |
154 | 156 | ||
155 | return_ACPI_STATUS(AE_AML_INTERNAL); | 157 | return_ACPI_STATUS(AE_AML_INTERNAL); |
156 | } | 158 | } |
@@ -168,8 +170,8 @@ acpi_ex_resolve_operands(u16 opcode, | |||
168 | */ | 170 | */ |
169 | while (GET_CURRENT_ARG_TYPE(arg_types)) { | 171 | while (GET_CURRENT_ARG_TYPE(arg_types)) { |
170 | if (!stack_ptr || !*stack_ptr) { | 172 | if (!stack_ptr || !*stack_ptr) { |
171 | ACPI_REPORT_ERROR(("Null stack entry at %p\n", | 173 | ACPI_ERROR((AE_INFO, "Null stack entry at %p", |
172 | stack_ptr)); | 174 | stack_ptr)); |
173 | 175 | ||
174 | return_ACPI_STATUS(AE_AML_INTERNAL); | 176 | return_ACPI_STATUS(AE_AML_INTERNAL); |
175 | } | 177 | } |
@@ -187,6 +189,22 @@ acpi_ex_resolve_operands(u16 opcode, | |||
187 | 189 | ||
188 | object_type = | 190 | object_type = |
189 | ((struct acpi_namespace_node *)obj_desc)->type; | 191 | ((struct acpi_namespace_node *)obj_desc)->type; |
192 | |||
193 | /* | ||
194 | * Resolve an alias object. The construction of these objects | ||
195 | * guarantees that there is only one level of alias indirection; | ||
196 | * thus, the attached object is always the aliased namespace node | ||
197 | */ | ||
198 | if (object_type == ACPI_TYPE_LOCAL_ALIAS) { | ||
199 | obj_desc = | ||
200 | acpi_ns_get_attached_object((struct | ||
201 | acpi_namespace_node | ||
202 | *)obj_desc); | ||
203 | *stack_ptr = obj_desc; | ||
204 | object_type = | ||
205 | ((struct acpi_namespace_node *)obj_desc)-> | ||
206 | type; | ||
207 | } | ||
190 | break; | 208 | break; |
191 | 209 | ||
192 | case ACPI_DESC_TYPE_OPERAND: | 210 | case ACPI_DESC_TYPE_OPERAND: |
@@ -198,7 +216,9 @@ acpi_ex_resolve_operands(u16 opcode, | |||
198 | /* Check for bad acpi_object_type */ | 216 | /* Check for bad acpi_object_type */ |
199 | 217 | ||
200 | if (!acpi_ut_valid_object_type(object_type)) { | 218 | if (!acpi_ut_valid_object_type(object_type)) { |
201 | ACPI_REPORT_ERROR(("Bad operand object type [%X]\n", object_type)); | 219 | ACPI_ERROR((AE_INFO, |
220 | "Bad operand object type [%X]", | ||
221 | object_type)); | ||
202 | 222 | ||
203 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 223 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
204 | } | 224 | } |
@@ -236,7 +256,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
236 | break; | 256 | break; |
237 | 257 | ||
238 | default: | 258 | default: |
239 | ACPI_REPORT_ERROR(("Operand is a Reference, Unknown Reference Opcode: %X\n", obj_desc->reference.opcode)); | 259 | ACPI_ERROR((AE_INFO, |
260 | "Operand is a Reference, Unknown Reference Opcode: %X", | ||
261 | obj_desc->reference. | ||
262 | opcode)); | ||
240 | 263 | ||
241 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 264 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
242 | } | 265 | } |
@@ -247,10 +270,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
247 | 270 | ||
248 | /* Invalid descriptor */ | 271 | /* Invalid descriptor */ |
249 | 272 | ||
250 | ACPI_REPORT_ERROR(("Invalid descriptor %p [%s]\n", | 273 | ACPI_ERROR((AE_INFO, |
251 | obj_desc, | 274 | "Invalid descriptor %p [%s]", |
252 | acpi_ut_get_descriptor_name | 275 | obj_desc, |
253 | (obj_desc))); | 276 | acpi_ut_get_descriptor_name(obj_desc))); |
254 | 277 | ||
255 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 278 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
256 | } | 279 | } |
@@ -408,7 +431,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
408 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); | 431 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); |
409 | if (ACPI_FAILURE(status)) { | 432 | if (ACPI_FAILURE(status)) { |
410 | if (status == AE_TYPE) { | 433 | if (status == AE_TYPE) { |
411 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 434 | ACPI_ERROR((AE_INFO, |
435 | "Needed [Integer/String/Buffer], found [%s] %p", | ||
436 | acpi_ut_get_object_type_name | ||
437 | (obj_desc), obj_desc)); | ||
412 | 438 | ||
413 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 439 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
414 | } | 440 | } |
@@ -431,7 +457,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
431 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); | 457 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); |
432 | if (ACPI_FAILURE(status)) { | 458 | if (ACPI_FAILURE(status)) { |
433 | if (status == AE_TYPE) { | 459 | if (status == AE_TYPE) { |
434 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 460 | ACPI_ERROR((AE_INFO, |
461 | "Needed [Integer/String/Buffer], found [%s] %p", | ||
462 | acpi_ut_get_object_type_name | ||
463 | (obj_desc), obj_desc)); | ||
435 | 464 | ||
436 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 465 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
437 | } | 466 | } |
@@ -455,7 +484,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
455 | ACPI_IMPLICIT_CONVERT_HEX); | 484 | ACPI_IMPLICIT_CONVERT_HEX); |
456 | if (ACPI_FAILURE(status)) { | 485 | if (ACPI_FAILURE(status)) { |
457 | if (status == AE_TYPE) { | 486 | if (status == AE_TYPE) { |
458 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 487 | ACPI_ERROR((AE_INFO, |
488 | "Needed [Integer/String/Buffer], found [%s] %p", | ||
489 | acpi_ut_get_object_type_name | ||
490 | (obj_desc), obj_desc)); | ||
459 | 491 | ||
460 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 492 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
461 | } | 493 | } |
@@ -481,7 +513,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
481 | break; | 513 | break; |
482 | 514 | ||
483 | default: | 515 | default: |
484 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 516 | ACPI_ERROR((AE_INFO, |
517 | "Needed [Integer/String/Buffer], found [%s] %p", | ||
518 | acpi_ut_get_object_type_name | ||
519 | (obj_desc), obj_desc)); | ||
485 | 520 | ||
486 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 521 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
487 | } | 522 | } |
@@ -515,7 +550,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
515 | break; | 550 | break; |
516 | 551 | ||
517 | default: | 552 | default: |
518 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 553 | ACPI_ERROR((AE_INFO, |
554 | "Needed [Integer/String/Buffer], found [%s] %p", | ||
555 | acpi_ut_get_object_type_name | ||
556 | (obj_desc), obj_desc)); | ||
519 | 557 | ||
520 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 558 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
521 | } | 559 | } |
@@ -539,7 +577,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
539 | break; | 577 | break; |
540 | 578 | ||
541 | default: | 579 | default: |
542 | ACPI_REPORT_ERROR(("Needed [Buffer/String/Package/Reference], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 580 | ACPI_ERROR((AE_INFO, |
581 | "Needed [Buffer/String/Package/Reference], found [%s] %p", | ||
582 | acpi_ut_get_object_type_name | ||
583 | (obj_desc), obj_desc)); | ||
543 | 584 | ||
544 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 585 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
545 | } | 586 | } |
@@ -558,7 +599,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
558 | break; | 599 | break; |
559 | 600 | ||
560 | default: | 601 | default: |
561 | ACPI_REPORT_ERROR(("Needed [Buffer/String/Package], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 602 | ACPI_ERROR((AE_INFO, |
603 | "Needed [Buffer/String/Package], found [%s] %p", | ||
604 | acpi_ut_get_object_type_name | ||
605 | (obj_desc), obj_desc)); | ||
562 | 606 | ||
563 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 607 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
564 | } | 608 | } |
@@ -578,7 +622,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
578 | break; | 622 | break; |
579 | 623 | ||
580 | default: | 624 | default: |
581 | ACPI_REPORT_ERROR(("Needed [Region/region_field], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 625 | ACPI_ERROR((AE_INFO, |
626 | "Needed [Region/region_field], found [%s] %p", | ||
627 | acpi_ut_get_object_type_name | ||
628 | (obj_desc), obj_desc)); | ||
582 | 629 | ||
583 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 630 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
584 | } | 631 | } |
@@ -620,7 +667,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
620 | break; | 667 | break; |
621 | } | 668 | } |
622 | 669 | ||
623 | ACPI_REPORT_ERROR(("Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); | 670 | ACPI_ERROR((AE_INFO, |
671 | "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p", | ||
672 | acpi_ut_get_object_type_name | ||
673 | (obj_desc), obj_desc)); | ||
624 | 674 | ||
625 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 675 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
626 | } | 676 | } |
@@ -630,7 +680,9 @@ acpi_ex_resolve_operands(u16 opcode, | |||
630 | 680 | ||
631 | /* Unknown type */ | 681 | /* Unknown type */ |
632 | 682 | ||
633 | ACPI_REPORT_ERROR(("Internal - Unknown ARGI (required operand) type %X\n", this_arg_type)); | 683 | ACPI_ERROR((AE_INFO, |
684 | "Internal - Unknown ARGI (required operand) type %X", | ||
685 | this_arg_type)); | ||
634 | 686 | ||
635 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 687 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
636 | } | 688 | } |
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 202ebe1eb957..3f020c0e2b95 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c | |||
@@ -250,7 +250,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
250 | /* Validate parameters */ | 250 | /* Validate parameters */ |
251 | 251 | ||
252 | if (!source_desc || !dest_desc) { | 252 | if (!source_desc || !dest_desc) { |
253 | ACPI_REPORT_ERROR(("Null parameter\n")); | 253 | ACPI_ERROR((AE_INFO, "Null parameter")); |
254 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 254 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
255 | } | 255 | } |
256 | 256 | ||
@@ -290,7 +290,10 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
290 | 290 | ||
291 | /* Destination is not a Reference object */ | 291 | /* Destination is not a Reference object */ |
292 | 292 | ||
293 | ACPI_REPORT_ERROR(("Target is not a Reference or Constant object - %s [%p]\n", acpi_ut_get_object_type_name(dest_desc), dest_desc)); | 293 | ACPI_ERROR((AE_INFO, |
294 | "Target is not a Reference or Constant object - %s [%p]", | ||
295 | acpi_ut_get_object_type_name(dest_desc), | ||
296 | dest_desc)); | ||
294 | 297 | ||
295 | ACPI_DUMP_STACK_ENTRY(source_desc); | 298 | ACPI_DUMP_STACK_ENTRY(source_desc); |
296 | ACPI_DUMP_STACK_ENTRY(dest_desc); | 299 | ACPI_DUMP_STACK_ENTRY(dest_desc); |
@@ -357,8 +360,8 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
357 | 360 | ||
358 | default: | 361 | default: |
359 | 362 | ||
360 | ACPI_REPORT_ERROR(("Unknown Reference opcode %X\n", | 363 | ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X", |
361 | ref_desc->reference.opcode)); | 364 | ref_desc->reference.opcode)); |
362 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); | 365 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); |
363 | 366 | ||
364 | status = AE_AML_INTERNAL; | 367 | status = AE_AML_INTERNAL; |
@@ -487,7 +490,9 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
487 | 490 | ||
488 | /* All other types are invalid */ | 491 | /* All other types are invalid */ |
489 | 492 | ||
490 | ACPI_REPORT_ERROR(("Source must be Integer/Buffer/String type, not %s\n", acpi_ut_get_object_type_name(source_desc))); | 493 | ACPI_ERROR((AE_INFO, |
494 | "Source must be Integer/Buffer/String type, not %s", | ||
495 | acpi_ut_get_object_type_name(source_desc))); | ||
491 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 496 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
492 | } | 497 | } |
493 | 498 | ||
@@ -497,7 +502,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
497 | break; | 502 | break; |
498 | 503 | ||
499 | default: | 504 | default: |
500 | ACPI_REPORT_ERROR(("Target is not a Package or buffer_field\n")); | 505 | ACPI_ERROR((AE_INFO, |
506 | "Target is not a Package or buffer_field")); | ||
501 | status = AE_AML_OPERAND_TYPE; | 507 | status = AE_AML_OPERAND_TYPE; |
502 | break; | 508 | break; |
503 | } | 509 | } |
diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c index 25bbc1d78547..42967baf760d 100644 --- a/drivers/acpi/executer/exstoren.c +++ b/drivers/acpi/executer/exstoren.c | |||
@@ -123,7 +123,10 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, | |||
123 | && (source_desc->reference.opcode == AML_LOAD_OP))) { | 123 | && (source_desc->reference.opcode == AML_LOAD_OP))) { |
124 | /* Conversion successful but still not a valid type */ | 124 | /* Conversion successful but still not a valid type */ |
125 | 125 | ||
126 | ACPI_REPORT_ERROR(("Cannot assign type %s to %s (must be type Int/Str/Buf)\n", acpi_ut_get_object_type_name(source_desc), acpi_ut_get_type_name(target_type))); | 126 | ACPI_ERROR((AE_INFO, |
127 | "Cannot assign type %s to %s (must be type Int/Str/Buf)", | ||
128 | acpi_ut_get_object_type_name(source_desc), | ||
129 | acpi_ut_get_type_name(target_type))); | ||
127 | status = AE_AML_OPERAND_TYPE; | 130 | status = AE_AML_OPERAND_TYPE; |
128 | } | 131 | } |
129 | break; | 132 | break; |
@@ -131,9 +134,11 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, | |||
131 | case ACPI_TYPE_LOCAL_ALIAS: | 134 | case ACPI_TYPE_LOCAL_ALIAS: |
132 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: | 135 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: |
133 | 136 | ||
134 | /* Aliases are resolved by acpi_ex_prep_operands */ | 137 | /* |
135 | 138 | * All aliases should have been resolved earlier, during the | |
136 | ACPI_REPORT_ERROR(("Store into Alias - should never happen\n")); | 139 | * operand resolution phase. |
140 | */ | ||
141 | ACPI_ERROR((AE_INFO, "Store into an unresolved Alias object")); | ||
137 | status = AE_AML_INTERNAL; | 142 | status = AE_AML_INTERNAL; |
138 | break; | 143 | break; |
139 | 144 | ||
@@ -276,8 +281,8 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, | |||
276 | /* | 281 | /* |
277 | * All other types come here. | 282 | * All other types come here. |
278 | */ | 283 | */ |
279 | ACPI_REPORT_WARNING(("Store into type %s not implemented\n", | 284 | ACPI_WARNING((AE_INFO, "Store into type %s not implemented", |
280 | acpi_ut_get_object_type_name(dest_desc))); | 285 | acpi_ut_get_object_type_name(dest_desc))); |
281 | 286 | ||
282 | status = AE_NOT_IMPLEMENTED; | 287 | status = AE_NOT_IMPLEMENTED; |
283 | break; | 288 | break; |
diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c index 9a3684d3cf87..ea9144f42e1f 100644 --- a/drivers/acpi/executer/exsystem.c +++ b/drivers/acpi/executer/exsystem.c | |||
@@ -129,8 +129,8 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) | |||
129 | * (ACPI specifies 100 usec as max, but this gives some slack in | 129 | * (ACPI specifies 100 usec as max, but this gives some slack in |
130 | * order to support existing BIOSs) | 130 | * order to support existing BIOSs) |
131 | */ | 131 | */ |
132 | ACPI_REPORT_ERROR(("Time parameter is too large (%d)\n", | 132 | ACPI_ERROR((AE_INFO, "Time parameter is too large (%d)", |
133 | how_long)); | 133 | how_long)); |
134 | status = AE_AML_OPERAND_VALUE; | 134 | status = AE_AML_OPERAND_VALUE; |
135 | } else { | 135 | } else { |
136 | acpi_os_stall(how_long); | 136 | acpi_os_stall(how_long); |
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index 990c40e0c041..f73a61aeb7ec 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.c | |||
@@ -91,7 +91,7 @@ acpi_status acpi_ex_enter_interpreter(void) | |||
91 | 91 | ||
92 | status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); | 92 | status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); |
93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
94 | ACPI_REPORT_ERROR(("Could not acquire interpreter mutex\n")); | 94 | ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex")); |
95 | } | 95 | } |
96 | 96 | ||
97 | return_ACPI_STATUS(status); | 97 | return_ACPI_STATUS(status); |
@@ -127,7 +127,7 @@ void acpi_ex_exit_interpreter(void) | |||
127 | 127 | ||
128 | status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); | 128 | status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); |
129 | if (ACPI_FAILURE(status)) { | 129 | if (ACPI_FAILURE(status)) { |
130 | ACPI_REPORT_ERROR(("Could not release interpreter mutex\n")); | 130 | ACPI_ERROR((AE_INFO, "Could not release interpreter mutex")); |
131 | } | 131 | } |
132 | 132 | ||
133 | return_VOID; | 133 | return_VOID; |
@@ -200,7 +200,8 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags) | |||
200 | if (ACPI_SUCCESS(status)) { | 200 | if (ACPI_SUCCESS(status)) { |
201 | locked = TRUE; | 201 | locked = TRUE; |
202 | } else { | 202 | } else { |
203 | ACPI_REPORT_ERROR(("Could not acquire Global Lock, %s\n", acpi_format_exception(status))); | 203 | ACPI_EXCEPTION((AE_INFO, status, |
204 | "Could not acquire Global Lock")); | ||
204 | } | 205 | } |
205 | } | 206 | } |
206 | 207 | ||
@@ -235,7 +236,8 @@ void acpi_ex_release_global_lock(u8 locked_by_me) | |||
235 | if (ACPI_FAILURE(status)) { | 236 | if (ACPI_FAILURE(status)) { |
236 | /* Report the error, but there isn't much else we can do */ | 237 | /* Report the error, but there isn't much else we can do */ |
237 | 238 | ||
238 | ACPI_REPORT_ERROR(("Could not release ACPI Global Lock, %s\n", acpi_format_exception(status))); | 239 | ACPI_EXCEPTION((AE_INFO, status, |
240 | "Could not release ACPI Global Lock")); | ||
239 | } | 241 | } |
240 | } | 242 | } |
241 | 243 | ||
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); |
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index c2db93e25b78..1149bc18fb35 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c | |||
@@ -110,7 +110,9 @@ acpi_status acpi_ns_root_initialize(void) | |||
110 | ACPI_NS_NO_UPSEARCH, NULL, &new_node); | 110 | ACPI_NS_NO_UPSEARCH, NULL, &new_node); |
111 | 111 | ||
112 | if (ACPI_FAILURE(status) || (!new_node)) { /* Must be on same line for code converter */ | 112 | if (ACPI_FAILURE(status) || (!new_node)) { /* Must be on same line for code converter */ |
113 | ACPI_REPORT_ERROR(("Could not create predefined name %s, %s\n", init_val->name, acpi_format_exception(status))); | 113 | ACPI_EXCEPTION((AE_INFO, status, |
114 | "Could not create predefined name %s", | ||
115 | init_val->name)); | ||
114 | } | 116 | } |
115 | 117 | ||
116 | /* | 118 | /* |
@@ -121,7 +123,9 @@ acpi_status acpi_ns_root_initialize(void) | |||
121 | if (init_val->val) { | 123 | if (init_val->val) { |
122 | status = acpi_os_predefined_override(init_val, &val); | 124 | status = acpi_os_predefined_override(init_val, &val); |
123 | if (ACPI_FAILURE(status)) { | 125 | if (ACPI_FAILURE(status)) { |
124 | ACPI_REPORT_ERROR(("Could not override predefined %s\n", init_val->name)); | 126 | ACPI_ERROR((AE_INFO, |
127 | "Could not override predefined %s", | ||
128 | init_val->name)); | ||
125 | } | 129 | } |
126 | 130 | ||
127 | if (!val) { | 131 | if (!val) { |
@@ -228,7 +232,9 @@ acpi_status acpi_ns_root_initialize(void) | |||
228 | 232 | ||
229 | default: | 233 | default: |
230 | 234 | ||
231 | ACPI_REPORT_ERROR(("Unsupported initial type value %X\n", init_val->type)); | 235 | ACPI_ERROR((AE_INFO, |
236 | "Unsupported initial type value %X", | ||
237 | init_val->type)); | ||
232 | acpi_ut_remove_reference(obj_desc); | 238 | acpi_ut_remove_reference(obj_desc); |
233 | obj_desc = NULL; | 239 | obj_desc = NULL; |
234 | continue; | 240 | continue; |
@@ -334,10 +340,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
334 | prefix_node = scope_info->scope.node; | 340 | prefix_node = scope_info->scope.node; |
335 | if (ACPI_GET_DESCRIPTOR_TYPE(prefix_node) != | 341 | if (ACPI_GET_DESCRIPTOR_TYPE(prefix_node) != |
336 | ACPI_DESC_TYPE_NAMED) { | 342 | ACPI_DESC_TYPE_NAMED) { |
337 | ACPI_REPORT_ERROR(("%p is not a namespace node [%s]\n", | 343 | ACPI_ERROR((AE_INFO, "%p is not a namespace node [%s]", |
338 | prefix_node, | 344 | prefix_node, |
339 | acpi_ut_get_descriptor_name | 345 | acpi_ut_get_descriptor_name(prefix_node))); |
340 | (prefix_node))); | ||
341 | return_ACPI_STATUS(AE_AML_INTERNAL); | 346 | return_ACPI_STATUS(AE_AML_INTERNAL); |
342 | } | 347 | } |
343 | 348 | ||
@@ -427,7 +432,8 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
427 | if (!this_node) { | 432 | if (!this_node) { |
428 | /* Current scope has no parent scope */ | 433 | /* Current scope has no parent scope */ |
429 | 434 | ||
430 | ACPI_REPORT_ERROR(("ACPI path has too many parent prefixes (^) - reached beyond root node\n")); | 435 | ACPI_ERROR((AE_INFO, |
436 | "ACPI path has too many parent prefixes (^) - reached beyond root node")); | ||
431 | return_ACPI_STATUS(AE_NOT_FOUND); | 437 | return_ACPI_STATUS(AE_NOT_FOUND); |
432 | } | 438 | } |
433 | } | 439 | } |
@@ -598,7 +604,12 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
598 | (this_node->type != type_to_check_for)) { | 604 | (this_node->type != type_to_check_for)) { |
599 | /* Complain about a type mismatch */ | 605 | /* Complain about a type mismatch */ |
600 | 606 | ||
601 | ACPI_REPORT_WARNING(("ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)\n", ACPI_CAST_PTR(char, &simple_name), acpi_ut_get_type_name(this_node->type), acpi_ut_get_type_name(type_to_check_for))); | 607 | ACPI_WARNING((AE_INFO, |
608 | "ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)", | ||
609 | ACPI_CAST_PTR(char, &simple_name), | ||
610 | acpi_ut_get_type_name(this_node->type), | ||
611 | acpi_ut_get_type_name | ||
612 | (type_to_check_for))); | ||
602 | } | 613 | } |
603 | 614 | ||
604 | /* | 615 | /* |
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index 3db950f5d5a0..9b871f38b61b 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
@@ -272,8 +272,8 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
272 | /* Grandchildren should have all been deleted already */ | 272 | /* Grandchildren should have all been deleted already */ |
273 | 273 | ||
274 | if (child_node->child) { | 274 | if (child_node->child) { |
275 | ACPI_REPORT_ERROR(("Found a grandchild! P=%p C=%p\n", | 275 | ACPI_ERROR((AE_INFO, "Found a grandchild! P=%p C=%p", |
276 | parent_node, child_node)); | 276 | parent_node, child_node)); |
277 | } | 277 | } |
278 | 278 | ||
279 | /* Now we can free this child object */ | 279 | /* Now we can free this child object */ |
@@ -301,7 +301,9 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) | |||
301 | /* There should be only one reference remaining on this node */ | 301 | /* There should be only one reference remaining on this node */ |
302 | 302 | ||
303 | if (child_node->reference_count != 1) { | 303 | if (child_node->reference_count != 1) { |
304 | ACPI_REPORT_WARNING(("Existing references (%d) on node being deleted (%p)\n", child_node->reference_count, child_node)); | 304 | ACPI_WARNING((AE_INFO, |
305 | "Existing references (%d) on node being deleted (%p)", | ||
306 | child_node->reference_count, child_node)); | ||
305 | } | 307 | } |
306 | 308 | ||
307 | /* Now we can delete the node */ | 309 | /* Now we can delete the node */ |
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index 2f0b70e3e881..a2807317a84b 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c | |||
@@ -198,13 +198,13 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
198 | /* Check the node type and name */ | 198 | /* Check the node type and name */ |
199 | 199 | ||
200 | if (type > ACPI_TYPE_LOCAL_MAX) { | 200 | if (type > ACPI_TYPE_LOCAL_MAX) { |
201 | ACPI_REPORT_WARNING(("Invalid ACPI Object Type %08X\n", | 201 | ACPI_WARNING((AE_INFO, "Invalid ACPI Object Type %08X", |
202 | type)); | 202 | type)); |
203 | } | 203 | } |
204 | 204 | ||
205 | if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { | 205 | if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { |
206 | ACPI_REPORT_WARNING(("Invalid ACPI Name %08X\n", | 206 | ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X", |
207 | this_node->name.integer)); | 207 | this_node->name.integer)); |
208 | } | 208 | } |
209 | 209 | ||
210 | acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node)); | 210 | acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node)); |
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c index e3c667072e2f..19d7b94d40c3 100644 --- a/drivers/acpi/namespace/nseval.c +++ b/drivers/acpi/namespace/nseval.c | |||
@@ -373,7 +373,7 @@ acpi_ns_execute_control_method(struct acpi_parameter_info *info) | |||
373 | 373 | ||
374 | info->obj_desc = acpi_ns_get_attached_object(info->node); | 374 | info->obj_desc = acpi_ns_get_attached_object(info->node); |
375 | if (!info->obj_desc) { | 375 | if (!info->obj_desc) { |
376 | ACPI_REPORT_ERROR(("No attached method object\n")); | 376 | ACPI_ERROR((AE_INFO, "No attached method object")); |
377 | 377 | ||
378 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 378 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
379 | return_ACPI_STATUS(AE_NULL_OBJECT); | 379 | return_ACPI_STATUS(AE_NULL_OBJECT); |
diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c index 6c117893f301..9f929e479fd8 100644 --- a/drivers/acpi/namespace/nsinit.c +++ b/drivers/acpi/namespace/nsinit.c | |||
@@ -93,8 +93,7 @@ acpi_status acpi_ns_initialize_objects(void) | |||
93 | ACPI_UINT32_MAX, acpi_ns_init_one_object, | 93 | ACPI_UINT32_MAX, acpi_ns_init_one_object, |
94 | &info, NULL); | 94 | &info, NULL); |
95 | if (ACPI_FAILURE(status)) { | 95 | if (ACPI_FAILURE(status)) { |
96 | ACPI_REPORT_ERROR(("walk_namespace failed! %s\n", | 96 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); |
97 | acpi_format_exception(status))); | ||
98 | } | 97 | } |
99 | 98 | ||
100 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 99 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
@@ -159,12 +158,11 @@ acpi_status acpi_ns_initialize_devices(void) | |||
159 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 158 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
160 | 159 | ||
161 | if (ACPI_FAILURE(status)) { | 160 | if (ACPI_FAILURE(status)) { |
162 | ACPI_REPORT_ERROR(("walk_namespace failed! %s\n", | 161 | ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); |
163 | acpi_format_exception(status))); | ||
164 | } | 162 | } |
165 | 163 | ||
166 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 164 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
167 | "\n%hd Devices found containing: %hd _STA, %hd _INI methods\n", | 165 | "\n%hd Devices found - executed %hd _STA, %hd _INI methods\n", |
168 | info.device_count, info.num_STA, info.num_INI)); | 166 | info.device_count, info.num_STA, info.num_INI)); |
169 | 167 | ||
170 | return_ACPI_STATUS(status); | 168 | return_ACPI_STATUS(status); |
@@ -289,7 +287,10 @@ acpi_ns_init_one_object(acpi_handle obj_handle, | |||
289 | } | 287 | } |
290 | 288 | ||
291 | if (ACPI_FAILURE(status)) { | 289 | if (ACPI_FAILURE(status)) { |
292 | ACPI_REPORT_ERROR(("\nCould not execute arguments for [%4.4s] (%s), %s\n", acpi_ut_get_node_name(node), acpi_ut_get_type_name(type), acpi_format_exception(status))); | 290 | ACPI_EXCEPTION((AE_INFO, status, |
291 | "Could not execute arguments for [%4.4s] (%s)", | ||
292 | acpi_ut_get_node_name(node), | ||
293 | acpi_ut_get_type_name(type))); | ||
293 | } | 294 | } |
294 | 295 | ||
295 | /* | 296 | /* |
@@ -416,9 +417,8 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
416 | #ifdef ACPI_DEBUG_OUTPUT | 417 | #ifdef ACPI_DEBUG_OUTPUT |
417 | char *scope_name = acpi_ns_get_external_pathname(ini_node); | 418 | char *scope_name = acpi_ns_get_external_pathname(ini_node); |
418 | 419 | ||
419 | ACPI_REPORT_WARNING(("%s._INI failed: %s\n", | 420 | ACPI_WARNING((AE_INFO, "%s._INI failed: %s", |
420 | scope_name, | 421 | scope_name, acpi_format_exception(status))); |
421 | acpi_format_exception(status))); | ||
422 | 422 | ||
423 | ACPI_MEM_FREE(scope_name); | 423 | ACPI_MEM_FREE(scope_name); |
424 | #endif | 424 | #endif |
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c index 0b4a866ef5aa..4e0b0524c188 100644 --- a/drivers/acpi/namespace/nsload.c +++ b/drivers/acpi/namespace/nsload.c | |||
@@ -92,7 +92,7 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, | |||
92 | /* Check validity of the AML start and length */ | 92 | /* Check validity of the AML start and length */ |
93 | 93 | ||
94 | if (!table_desc->aml_start) { | 94 | if (!table_desc->aml_start) { |
95 | ACPI_REPORT_ERROR(("Null AML pointer\n")); | 95 | ACPI_ERROR((AE_INFO, "Null AML pointer")); |
96 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 96 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
97 | } | 97 | } |
98 | 98 | ||
@@ -102,8 +102,8 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, | |||
102 | /* Ignore table if there is no AML contained within */ | 102 | /* Ignore table if there is no AML contained within */ |
103 | 103 | ||
104 | if (!table_desc->aml_length) { | 104 | if (!table_desc->aml_length) { |
105 | ACPI_REPORT_WARNING(("Zero-length AML block in table [%4.4s]\n", | 105 | ACPI_WARNING((AE_INFO, "Zero-length AML block in table [%4.4s]", |
106 | table_desc->pointer->signature)); | 106 | table_desc->pointer->signature)); |
107 | return_ACPI_STATUS(AE_OK); | 107 | return_ACPI_STATUS(AE_OK); |
108 | } | 108 | } |
109 | 109 | ||
@@ -263,7 +263,7 @@ acpi_status acpi_ns_load_namespace(void) | |||
263 | /* There must be at least a DSDT installed */ | 263 | /* There must be at least a DSDT installed */ |
264 | 264 | ||
265 | if (acpi_gbl_DSDT == NULL) { | 265 | if (acpi_gbl_DSDT == NULL) { |
266 | ACPI_REPORT_ERROR(("DSDT is not in memory\n")); | 266 | ACPI_ERROR((AE_INFO, "DSDT is not in memory")); |
267 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 267 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
268 | } | 268 | } |
269 | 269 | ||
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index 411e1f8b11d0..639f653b4b6b 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c | |||
@@ -110,7 +110,9 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, | |||
110 | name_buffer[index] = AML_ROOT_PREFIX; | 110 | name_buffer[index] = AML_ROOT_PREFIX; |
111 | 111 | ||
112 | if (index != 0) { | 112 | if (index != 0) { |
113 | ACPI_REPORT_ERROR(("Could not construct pathname; index=%X, size=%X, Path=%s\n", (u32) index, (u32) size, &name_buffer[size])); | 113 | ACPI_ERROR((AE_INFO, |
114 | "Could not construct pathname; index=%X, size=%X, Path=%s", | ||
115 | (u32) index, (u32) size, &name_buffer[size])); | ||
114 | } | 116 | } |
115 | 117 | ||
116 | return; | 118 | return; |
@@ -146,7 +148,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) | |||
146 | 148 | ||
147 | name_buffer = ACPI_MEM_CALLOCATE(size); | 149 | name_buffer = ACPI_MEM_CALLOCATE(size); |
148 | if (!name_buffer) { | 150 | if (!name_buffer) { |
149 | ACPI_REPORT_ERROR(("Allocation failure\n")); | 151 | ACPI_ERROR((AE_INFO, "Allocation failure")); |
150 | return_PTR(NULL); | 152 | return_PTR(NULL); |
151 | } | 153 | } |
152 | 154 | ||
diff --git a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c index 86113093f7b7..10ae6292bca4 100644 --- a/drivers/acpi/namespace/nsobject.c +++ b/drivers/acpi/namespace/nsobject.c | |||
@@ -84,22 +84,23 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, | |||
84 | if (!node) { | 84 | if (!node) { |
85 | /* Invalid handle */ | 85 | /* Invalid handle */ |
86 | 86 | ||
87 | ACPI_REPORT_ERROR(("Null named_obj handle\n")); | 87 | ACPI_ERROR((AE_INFO, "Null named_obj handle")); |
88 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 88 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
89 | } | 89 | } |
90 | 90 | ||
91 | if (!object && (ACPI_TYPE_ANY != type)) { | 91 | if (!object && (ACPI_TYPE_ANY != type)) { |
92 | /* Null object */ | 92 | /* Null object */ |
93 | 93 | ||
94 | ACPI_REPORT_ERROR(("Null object, but type not ACPI_TYPE_ANY\n")); | 94 | ACPI_ERROR((AE_INFO, |
95 | "Null object, but type not ACPI_TYPE_ANY")); | ||
95 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 96 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
96 | } | 97 | } |
97 | 98 | ||
98 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { | 99 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { |
99 | /* Not a name handle */ | 100 | /* Not a name handle */ |
100 | 101 | ||
101 | ACPI_REPORT_ERROR(("Invalid handle %p [%s]\n", | 102 | ACPI_ERROR((AE_INFO, "Invalid handle %p [%s]", |
102 | node, acpi_ut_get_descriptor_name(node))); | 103 | node, acpi_ut_get_descriptor_name(node))); |
103 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 104 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
104 | } | 105 | } |
105 | 106 | ||
@@ -254,7 +255,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct | |||
254 | ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node); | 255 | ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node); |
255 | 256 | ||
256 | if (!node) { | 257 | if (!node) { |
257 | ACPI_REPORT_WARNING(("Null Node ptr\n")); | 258 | ACPI_WARNING((AE_INFO, "Null Node ptr")); |
258 | return_PTR(NULL); | 259 | return_PTR(NULL); |
259 | } | 260 | } |
260 | 261 | ||
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index f094a2eb8512..d64b78952f24 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
@@ -298,15 +298,17 @@ acpi_ns_search_and_enter(u32 target_name, | |||
298 | /* Parameter validation */ | 298 | /* Parameter validation */ |
299 | 299 | ||
300 | if (!node || !target_name || !return_node) { | 300 | if (!node || !target_name || !return_node) { |
301 | ACPI_REPORT_ERROR(("Null param: Node %p Name %X return_node %p\n", node, target_name, return_node)); | 301 | ACPI_ERROR((AE_INFO, |
302 | "Null param: Node %p Name %X return_node %p", | ||
303 | node, target_name, return_node)); | ||
302 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 304 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
303 | } | 305 | } |
304 | 306 | ||
305 | /* Name must consist of printable characters */ | 307 | /* Name must consist of printable characters */ |
306 | 308 | ||
307 | if (!acpi_ut_valid_acpi_name(target_name)) { | 309 | if (!acpi_ut_valid_acpi_name(target_name)) { |
308 | ACPI_REPORT_ERROR(("Bad character in ACPI Name: %X\n", | 310 | ACPI_ERROR((AE_INFO, "Bad character in ACPI Name: %X", |
309 | target_name)); | 311 | target_name)); |
310 | return_ACPI_STATUS(AE_BAD_CHARACTER); | 312 | return_ACPI_STATUS(AE_BAD_CHARACTER); |
311 | } | 313 | } |
312 | 314 | ||
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index bc779fdd3caf..3e7cad549a38 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
@@ -85,7 +85,7 @@ acpi_ns_report_error(char *module_name, | |||
85 | if (lookup_status == AE_BAD_CHARACTER) { | 85 | if (lookup_status == AE_BAD_CHARACTER) { |
86 | /* There is a non-ascii character in the name */ | 86 | /* There is a non-ascii character in the name */ |
87 | 87 | ||
88 | acpi_os_printf("[0x%4.4X] (NON-ASCII)\n", | 88 | acpi_os_printf("[0x%4.4X] (NON-ASCII)", |
89 | *(ACPI_CAST_PTR(u32, internal_name))); | 89 | *(ACPI_CAST_PTR(u32, internal_name))); |
90 | } else { | 90 | } else { |
91 | /* Convert path to external format */ | 91 | /* Convert path to external format */ |
@@ -106,7 +106,7 @@ acpi_ns_report_error(char *module_name, | |||
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | acpi_os_printf("Namespace lookup failure, %s\n", | 109 | acpi_os_printf(" Namespace lookup failure, %s\n", |
110 | acpi_format_exception(lookup_status)); | 110 | acpi_format_exception(lookup_status)); |
111 | } | 111 | } |
112 | 112 | ||
@@ -242,7 +242,7 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | |||
242 | ACPI_FUNCTION_TRACE("ns_get_type"); | 242 | ACPI_FUNCTION_TRACE("ns_get_type"); |
243 | 243 | ||
244 | if (!node) { | 244 | if (!node) { |
245 | ACPI_REPORT_WARNING(("Null Node parameter\n")); | 245 | ACPI_WARNING((AE_INFO, "Null Node parameter")); |
246 | return_UINT32(ACPI_TYPE_ANY); | 246 | return_UINT32(ACPI_TYPE_ANY); |
247 | } | 247 | } |
248 | 248 | ||
@@ -269,7 +269,7 @@ u32 acpi_ns_local(acpi_object_type type) | |||
269 | if (!acpi_ut_valid_object_type(type)) { | 269 | if (!acpi_ut_valid_object_type(type)) { |
270 | /* Type code out of range */ | 270 | /* Type code out of range */ |
271 | 271 | ||
272 | ACPI_REPORT_WARNING(("Invalid Object Type %X\n", type)); | 272 | ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); |
273 | return_UINT32(ACPI_NS_NORMAL); | 273 | return_UINT32(ACPI_NS_NORMAL); |
274 | } | 274 | } |
275 | 275 | ||
@@ -621,7 +621,7 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
621 | * with internal_name (invalid format). | 621 | * with internal_name (invalid format). |
622 | */ | 622 | */ |
623 | if (required_length > internal_name_length) { | 623 | if (required_length > internal_name_length) { |
624 | ACPI_REPORT_ERROR(("Invalid internal name\n")); | 624 | ACPI_ERROR((AE_INFO, "Invalid internal name")); |
625 | return_ACPI_STATUS(AE_BAD_PATHNAME); | 625 | return_ACPI_STATUS(AE_BAD_PATHNAME); |
626 | } | 626 | } |
627 | 627 | ||
@@ -797,7 +797,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
797 | if (!acpi_ut_valid_object_type(type)) { | 797 | if (!acpi_ut_valid_object_type(type)) { |
798 | /* type code out of range */ | 798 | /* type code out of range */ |
799 | 799 | ||
800 | ACPI_REPORT_WARNING(("Invalid Object Type %X\n", type)); | 800 | ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); |
801 | return_UINT32(ACPI_NS_NORMAL); | 801 | return_UINT32(ACPI_NS_NORMAL); |
802 | } | 802 | } |
803 | 803 | ||
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index de13add43efc..a95f636dc35d 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c | |||
@@ -112,7 +112,7 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
112 | if (return_buffer->length == 0) { | 112 | if (return_buffer->length == 0) { |
113 | /* Error because caller specifically asked for a return value */ | 113 | /* Error because caller specifically asked for a return value */ |
114 | 114 | ||
115 | ACPI_REPORT_ERROR(("No return value\n")); | 115 | ACPI_ERROR((AE_INFO, "No return value")); |
116 | return_ACPI_STATUS(AE_NULL_OBJECT); | 116 | return_ACPI_STATUS(AE_NULL_OBJECT); |
117 | } | 117 | } |
118 | 118 | ||
@@ -124,11 +124,11 @@ acpi_evaluate_object_typed(acpi_handle handle, | |||
124 | 124 | ||
125 | /* Return object type does not match requested type */ | 125 | /* Return object type does not match requested type */ |
126 | 126 | ||
127 | ACPI_REPORT_ERROR(("Incorrect return type [%s] requested [%s]\n", | 127 | ACPI_ERROR((AE_INFO, |
128 | acpi_ut_get_type_name(((union acpi_object *) | 128 | "Incorrect return type [%s] requested [%s]", |
129 | return_buffer->pointer)-> | 129 | acpi_ut_get_type_name(((union acpi_object *)return_buffer-> |
130 | type), | 130 | pointer)->type), |
131 | acpi_ut_get_type_name(return_type))); | 131 | acpi_ut_get_type_name(return_type))); |
132 | 132 | ||
133 | if (must_free) { | 133 | if (must_free) { |
134 | /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ | 134 | /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ |
@@ -235,9 +235,11 @@ acpi_evaluate_object(acpi_handle handle, | |||
235 | * qualified names above, this is an error | 235 | * qualified names above, this is an error |
236 | */ | 236 | */ |
237 | if (!pathname) { | 237 | if (!pathname) { |
238 | ACPI_REPORT_ERROR(("Both Handle and Pathname are NULL\n")); | 238 | ACPI_ERROR((AE_INFO, |
239 | "Both Handle and Pathname are NULL")); | ||
239 | } else { | 240 | } else { |
240 | ACPI_REPORT_ERROR(("Handle is NULL and Pathname is relative\n")); | 241 | ACPI_ERROR((AE_INFO, |
242 | "Handle is NULL and Pathname is relative")); | ||
241 | } | 243 | } |
242 | 244 | ||
243 | status = AE_BAD_PARAMETER; | 245 | status = AE_BAD_PARAMETER; |
diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c index 853e6d170c96..8cd8675a47c0 100644 --- a/drivers/acpi/namespace/nsxfname.c +++ b/drivers/acpi/namespace/nsxfname.c | |||
@@ -300,8 +300,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) | |||
300 | 300 | ||
301 | status = acpi_ut_execute_CID(node, &cid_list); | 301 | status = acpi_ut_execute_CID(node, &cid_list); |
302 | if (ACPI_SUCCESS(status)) { | 302 | if (ACPI_SUCCESS(status)) { |
303 | size += ((acpi_size) cid_list->count - 1) * | 303 | size += cid_list->size; |
304 | sizeof(struct acpi_compatible_id); | ||
305 | info->valid |= ACPI_VALID_CID; | 304 | info->valid |= ACPI_VALID_CID; |
306 | } | 305 | } |
307 | 306 | ||
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index cc4a4903842a..ac5bbaedac1b 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1062,9 +1062,9 @@ EXPORT_SYMBOL(max_cstate); | |||
1062 | * handle is a pointer to the spinlock_t. | 1062 | * handle is a pointer to the spinlock_t. |
1063 | */ | 1063 | */ |
1064 | 1064 | ||
1065 | acpi_native_uint acpi_os_acquire_lock(acpi_handle handle) | 1065 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle) |
1066 | { | 1066 | { |
1067 | unsigned long flags; | 1067 | acpi_cpu_flags flags; |
1068 | spin_lock_irqsave((spinlock_t *) handle, flags); | 1068 | spin_lock_irqsave((spinlock_t *) handle, flags); |
1069 | return flags; | 1069 | return flags; |
1070 | } | 1070 | } |
@@ -1073,9 +1073,9 @@ acpi_native_uint acpi_os_acquire_lock(acpi_handle handle) | |||
1073 | * Release a spinlock. See above. | 1073 | * Release a spinlock. See above. |
1074 | */ | 1074 | */ |
1075 | 1075 | ||
1076 | void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags) | 1076 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) |
1077 | { | 1077 | { |
1078 | spin_unlock_irqrestore((spinlock_t *) handle, (unsigned long) flags); | 1078 | spin_unlock_irqrestore((spinlock_t *) handle, flags); |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | #ifndef ACPI_USE_LOCAL_CACHE | 1081 | #ifndef ACPI_USE_LOCAL_CACHE |
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index 3c37cd0ecd80..de573be52718 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c | |||
@@ -298,7 +298,9 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
298 | acpi_ps_append_arg(arg, name_op); | 298 | acpi_ps_append_arg(arg, name_op); |
299 | 299 | ||
300 | if (!method_desc) { | 300 | if (!method_desc) { |
301 | ACPI_REPORT_ERROR(("Control Method %p has no attached object\n", node)); | 301 | ACPI_ERROR((AE_INFO, |
302 | "Control Method %p has no attached object", | ||
303 | node)); | ||
302 | return_ACPI_STATUS(AE_AML_INTERNAL); | 304 | return_ACPI_STATUS(AE_AML_INTERNAL); |
303 | } | 305 | } |
304 | 306 | ||
@@ -348,7 +350,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
348 | /* Final exception check (may have been changed from code above) */ | 350 | /* Final exception check (may have been changed from code above) */ |
349 | 351 | ||
350 | if (ACPI_FAILURE(status)) { | 352 | if (ACPI_FAILURE(status)) { |
351 | ACPI_REPORT_NSERROR(path, status); | 353 | ACPI_ERROR_NAMESPACE(path, status); |
352 | 354 | ||
353 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == | 355 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == |
354 | ACPI_PARSE_EXECUTE) { | 356 | ACPI_PARSE_EXECUTE) { |
@@ -451,7 +453,7 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, | |||
451 | 453 | ||
452 | default: | 454 | default: |
453 | 455 | ||
454 | ACPI_REPORT_ERROR(("Invalid arg_type %X\n", arg_type)); | 456 | ACPI_ERROR((AE_INFO, "Invalid arg_type %X", arg_type)); |
455 | return_VOID; | 457 | return_VOID; |
456 | } | 458 | } |
457 | 459 | ||
@@ -709,7 +711,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
709 | 711 | ||
710 | default: | 712 | default: |
711 | 713 | ||
712 | ACPI_REPORT_ERROR(("Invalid arg_type: %X\n", arg_type)); | 714 | ACPI_ERROR((AE_INFO, "Invalid arg_type: %X", arg_type)); |
713 | status = AE_AML_OPERAND_TYPE; | 715 | status = AE_AML_OPERAND_TYPE; |
714 | break; | 716 | break; |
715 | } | 717 | } |
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c index c66029b890b1..00b072e15d19 100644 --- a/drivers/acpi/parser/psloop.c +++ b/drivers/acpi/parser/psloop.c | |||
@@ -123,10 +123,12 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
123 | && ((status & AE_CODE_MASK) != | 123 | && ((status & AE_CODE_MASK) != |
124 | AE_CODE_CONTROL)) { | 124 | AE_CODE_CONTROL)) { |
125 | if (status == AE_AML_NO_RETURN_VALUE) { | 125 | if (status == AE_AML_NO_RETURN_VALUE) { |
126 | ACPI_REPORT_ERROR(("Invoked method did not return a value, %s\n", acpi_format_exception(status))); | 126 | ACPI_EXCEPTION((AE_INFO, status, |
127 | "Invoked method did not return a value")); | ||
127 | 128 | ||
128 | } | 129 | } |
129 | ACPI_REPORT_ERROR(("get_predicate Failed, %s\n", acpi_format_exception(status))); | 130 | ACPI_EXCEPTION((AE_INFO, status, |
131 | "get_predicate Failed")); | ||
130 | return_ACPI_STATUS(status); | 132 | return_ACPI_STATUS(status); |
131 | } | 133 | } |
132 | 134 | ||
@@ -184,7 +186,11 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
184 | 186 | ||
185 | /* The opcode is unrecognized. Just skip unknown opcodes */ | 187 | /* The opcode is unrecognized. Just skip unknown opcodes */ |
186 | 188 | ||
187 | ACPI_REPORT_ERROR(("Found unknown opcode %X at AML address %p offset %X, ignoring\n", walk_state->opcode, parser_state->aml, walk_state->aml_offset)); | 189 | ACPI_ERROR((AE_INFO, |
190 | "Found unknown opcode %X at AML address %p offset %X, ignoring", | ||
191 | walk_state->opcode, | ||
192 | parser_state->aml, | ||
193 | walk_state->aml_offset)); | ||
188 | 194 | ||
189 | ACPI_DUMP_BUFFER(parser_state->aml, 128); | 195 | ACPI_DUMP_BUFFER(parser_state->aml, 128); |
190 | 196 | ||
@@ -271,7 +277,8 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
271 | walk_state->descending_callback(walk_state, | 277 | walk_state->descending_callback(walk_state, |
272 | &op); | 278 | &op); |
273 | if (ACPI_FAILURE(status)) { | 279 | if (ACPI_FAILURE(status)) { |
274 | ACPI_REPORT_ERROR(("During name lookup/catalog, %s\n", acpi_format_exception(status))); | 280 | ACPI_EXCEPTION((AE_INFO, status, |
281 | "During name lookup/catalog")); | ||
275 | goto close_this_op; | 282 | goto close_this_op; |
276 | } | 283 | } |
277 | 284 | ||
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 3b540fe17a0c..a9f3229f4106 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c | |||
@@ -512,9 +512,9 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
512 | } else if ((status != AE_OK) && (walk_state->method_desc)) { | 512 | } else if ((status != AE_OK) && (walk_state->method_desc)) { |
513 | /* Either the method parse or actual execution failed */ | 513 | /* Either the method parse or actual execution failed */ |
514 | 514 | ||
515 | ACPI_REPORT_MTERROR("Method parse/execution failed", | 515 | ACPI_ERROR_METHOD("Method parse/execution failed", |
516 | walk_state->method_node, NULL, | 516 | walk_state->method_node, NULL, |
517 | status); | 517 | status); |
518 | 518 | ||
519 | /* Check for possible multi-thread reentrancy problem */ | 519 | /* Check for possible multi-thread reentrancy problem */ |
520 | 520 | ||
@@ -558,7 +558,8 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
558 | walk_state->method_desc->method. | 558 | walk_state->method_desc->method. |
559 | thread_count--; | 559 | thread_count--; |
560 | } else { | 560 | } else { |
561 | ACPI_REPORT_ERROR(("Invalid zero thread count in method\n")); | 561 | ACPI_ERROR((AE_INFO, |
562 | "Invalid zero thread count in method")); | ||
562 | } | 563 | } |
563 | } | 564 | } |
564 | 565 | ||
diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c index d387e2b01dbb..dd6f16726fc4 100644 --- a/drivers/acpi/parser/pstree.c +++ b/drivers/acpi/parser/pstree.c | |||
@@ -132,8 +132,8 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) | |||
132 | if (op_info->class == AML_CLASS_UNKNOWN) { | 132 | if (op_info->class == AML_CLASS_UNKNOWN) { |
133 | /* Invalid opcode */ | 133 | /* Invalid opcode */ |
134 | 134 | ||
135 | ACPI_REPORT_ERROR(("Invalid AML Opcode: 0x%2.2X\n", | 135 | ACPI_ERROR((AE_INFO, "Invalid AML Opcode: 0x%2.2X", |
136 | op->common.aml_opcode)); | 136 | op->common.aml_opcode)); |
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | 139 | ||
diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c index 1dfa6906d455..7d6481d9fbec 100644 --- a/drivers/acpi/resources/rscalc.c +++ b/drivers/acpi/resources/rscalc.c | |||
@@ -541,13 +541,13 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, | |||
541 | 541 | ||
542 | for (table_index = 0; table_index < 4 && !name_found; | 542 | for (table_index = 0; table_index < 4 && !name_found; |
543 | table_index++) { | 543 | table_index++) { |
544 | if ((ACPI_TYPE_STRING == | 544 | if (*sub_object_list && /* Null object allowed */ |
545 | ACPI_GET_OBJECT_TYPE(*sub_object_list)) | 545 | ((ACPI_TYPE_STRING == |
546 | || | 546 | ACPI_GET_OBJECT_TYPE(*sub_object_list)) || |
547 | ((ACPI_TYPE_LOCAL_REFERENCE == | 547 | ((ACPI_TYPE_LOCAL_REFERENCE == |
548 | ACPI_GET_OBJECT_TYPE(*sub_object_list)) | 548 | ACPI_GET_OBJECT_TYPE(*sub_object_list)) && |
549 | && ((*sub_object_list)->reference.opcode == | 549 | ((*sub_object_list)->reference.opcode == |
550 | AML_INT_NAMEPATH_OP))) { | 550 | AML_INT_NAMEPATH_OP)))) { |
551 | name_found = TRUE; | 551 | name_found = TRUE; |
552 | } else { | 552 | } else { |
553 | /* Look at the next element */ | 553 | /* Look at the next element */ |
diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c index 7f46ca0bf33a..8c128dea3252 100644 --- a/drivers/acpi/resources/rscreate.c +++ b/drivers/acpi/resources/rscreate.c | |||
@@ -207,14 +207,20 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
207 | /* Each element of the top-level package must also be a package */ | 207 | /* Each element of the top-level package must also be a package */ |
208 | 208 | ||
209 | if (ACPI_GET_OBJECT_TYPE(*top_object_list) != ACPI_TYPE_PACKAGE) { | 209 | if (ACPI_GET_OBJECT_TYPE(*top_object_list) != ACPI_TYPE_PACKAGE) { |
210 | ACPI_REPORT_ERROR(("(PRT[%X]) Need sub-package, found %s\n", index, acpi_ut_get_object_type_name(*top_object_list))); | 210 | ACPI_ERROR((AE_INFO, |
211 | "(PRT[%X]) Need sub-package, found %s", | ||
212 | index, | ||
213 | acpi_ut_get_object_type_name | ||
214 | (*top_object_list))); | ||
211 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 215 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
212 | } | 216 | } |
213 | 217 | ||
214 | /* Each sub-package must be of length 4 */ | 218 | /* Each sub-package must be of length 4 */ |
215 | 219 | ||
216 | if ((*top_object_list)->package.count != 4) { | 220 | if ((*top_object_list)->package.count != 4) { |
217 | ACPI_REPORT_ERROR(("(PRT[%X]) Need package of length 4, found length %d\n", index, (*top_object_list)->package.count)); | 221 | ACPI_ERROR((AE_INFO, |
222 | "(PRT[%X]) Need package of length 4, found length %d", | ||
223 | index, (*top_object_list)->package.count)); | ||
218 | return_ACPI_STATUS(AE_AML_PACKAGE_LIMIT); | 224 | return_ACPI_STATUS(AE_AML_PACKAGE_LIMIT); |
219 | } | 225 | } |
220 | 226 | ||
@@ -231,7 +237,10 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
231 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 237 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
232 | user_prt->address = obj_desc->integer.value; | 238 | user_prt->address = obj_desc->integer.value; |
233 | } else { | 239 | } else { |
234 | ACPI_REPORT_ERROR(("(PRT[%X].Address) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc))); | 240 | ACPI_ERROR((AE_INFO, |
241 | "(PRT[%X].Address) Need Integer, found %s", | ||
242 | index, | ||
243 | acpi_ut_get_object_type_name(obj_desc))); | ||
235 | return_ACPI_STATUS(AE_BAD_DATA); | 244 | return_ACPI_STATUS(AE_BAD_DATA); |
236 | } | 245 | } |
237 | 246 | ||
@@ -241,65 +250,83 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
241 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 250 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
242 | user_prt->pin = (u32) obj_desc->integer.value; | 251 | user_prt->pin = (u32) obj_desc->integer.value; |
243 | } else { | 252 | } else { |
244 | ACPI_REPORT_ERROR(("(PRT[%X].Pin) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc))); | 253 | ACPI_ERROR((AE_INFO, |
254 | "(PRT[%X].Pin) Need Integer, found %s", | ||
255 | index, | ||
256 | acpi_ut_get_object_type_name(obj_desc))); | ||
245 | return_ACPI_STATUS(AE_BAD_DATA); | 257 | return_ACPI_STATUS(AE_BAD_DATA); |
246 | } | 258 | } |
247 | 259 | ||
248 | /* 3) Third subobject: Dereference the PRT.source_name */ | 260 | /* |
249 | 261 | * 3) Third subobject: Dereference the PRT.source_name | |
262 | * The name may be unresolved (slack mode), so allow a null object | ||
263 | */ | ||
250 | obj_desc = sub_object_list[2]; | 264 | obj_desc = sub_object_list[2]; |
251 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | 265 | if (obj_desc) { |
252 | case ACPI_TYPE_LOCAL_REFERENCE: | 266 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
253 | 267 | case ACPI_TYPE_LOCAL_REFERENCE: | |
254 | if (obj_desc->reference.opcode != AML_INT_NAMEPATH_OP) { | 268 | |
255 | ACPI_REPORT_ERROR(("(PRT[%X].Source) Need name, found reference op %X\n", index, obj_desc->reference.opcode)); | 269 | if (obj_desc->reference.opcode != |
270 | AML_INT_NAMEPATH_OP) { | ||
271 | ACPI_ERROR((AE_INFO, | ||
272 | "(PRT[%X].Source) Need name, found reference op %X", | ||
273 | index, | ||
274 | obj_desc->reference. | ||
275 | opcode)); | ||
276 | return_ACPI_STATUS(AE_BAD_DATA); | ||
277 | } | ||
278 | |||
279 | node = obj_desc->reference.node; | ||
280 | |||
281 | /* Use *remaining* length of the buffer as max for pathname */ | ||
282 | |||
283 | path_buffer.length = output_buffer->length - | ||
284 | (u32) ((u8 *) user_prt->source - | ||
285 | (u8 *) output_buffer->pointer); | ||
286 | path_buffer.pointer = user_prt->source; | ||
287 | |||
288 | status = | ||
289 | acpi_ns_handle_to_pathname((acpi_handle) | ||
290 | node, | ||
291 | &path_buffer); | ||
292 | |||
293 | /* +1 to include null terminator */ | ||
294 | |||
295 | user_prt->length += | ||
296 | (u32) ACPI_STRLEN(user_prt->source) + 1; | ||
297 | break; | ||
298 | |||
299 | case ACPI_TYPE_STRING: | ||
300 | |||
301 | ACPI_STRCPY(user_prt->source, | ||
302 | obj_desc->string.pointer); | ||
303 | |||
304 | /* | ||
305 | * Add to the Length field the length of the string | ||
306 | * (add 1 for terminator) | ||
307 | */ | ||
308 | user_prt->length += obj_desc->string.length + 1; | ||
309 | break; | ||
310 | |||
311 | case ACPI_TYPE_INTEGER: | ||
312 | /* | ||
313 | * If this is a number, then the Source Name is NULL, since the | ||
314 | * entire buffer was zeroed out, we can leave this alone. | ||
315 | * | ||
316 | * Add to the Length field the length of the u32 NULL | ||
317 | */ | ||
318 | user_prt->length += sizeof(u32); | ||
319 | break; | ||
320 | |||
321 | default: | ||
322 | |||
323 | ACPI_ERROR((AE_INFO, | ||
324 | "(PRT[%X].Source) Need Ref/String/Integer, found %s", | ||
325 | index, | ||
326 | acpi_ut_get_object_type_name | ||
327 | (obj_desc))); | ||
256 | return_ACPI_STATUS(AE_BAD_DATA); | 328 | return_ACPI_STATUS(AE_BAD_DATA); |
257 | } | 329 | } |
258 | |||
259 | node = obj_desc->reference.node; | ||
260 | |||
261 | /* Use *remaining* length of the buffer as max for pathname */ | ||
262 | |||
263 | path_buffer.length = output_buffer->length - | ||
264 | (u32) ((u8 *) user_prt->source - | ||
265 | (u8 *) output_buffer->pointer); | ||
266 | path_buffer.pointer = user_prt->source; | ||
267 | |||
268 | status = | ||
269 | acpi_ns_handle_to_pathname((acpi_handle) node, | ||
270 | &path_buffer); | ||
271 | |||
272 | /* +1 to include null terminator */ | ||
273 | |||
274 | user_prt->length += | ||
275 | (u32) ACPI_STRLEN(user_prt->source) + 1; | ||
276 | break; | ||
277 | |||
278 | case ACPI_TYPE_STRING: | ||
279 | |||
280 | ACPI_STRCPY(user_prt->source, obj_desc->string.pointer); | ||
281 | |||
282 | /* | ||
283 | * Add to the Length field the length of the string | ||
284 | * (add 1 for terminator) | ||
285 | */ | ||
286 | user_prt->length += obj_desc->string.length + 1; | ||
287 | break; | ||
288 | |||
289 | case ACPI_TYPE_INTEGER: | ||
290 | /* | ||
291 | * If this is a number, then the Source Name is NULL, since the | ||
292 | * entire buffer was zeroed out, we can leave this alone. | ||
293 | * | ||
294 | * Add to the Length field the length of the u32 NULL | ||
295 | */ | ||
296 | user_prt->length += sizeof(u32); | ||
297 | break; | ||
298 | |||
299 | default: | ||
300 | |||
301 | ACPI_REPORT_ERROR(("(PRT[%X].Source) Need Ref/String/Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc))); | ||
302 | return_ACPI_STATUS(AE_BAD_DATA); | ||
303 | } | 330 | } |
304 | 331 | ||
305 | /* Now align the current length */ | 332 | /* Now align the current length */ |
@@ -313,7 +340,10 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
313 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 340 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
314 | user_prt->source_index = (u32) obj_desc->integer.value; | 341 | user_prt->source_index = (u32) obj_desc->integer.value; |
315 | } else { | 342 | } else { |
316 | ACPI_REPORT_ERROR(("(PRT[%X].source_index) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc))); | 343 | ACPI_ERROR((AE_INFO, |
344 | "(PRT[%X].source_index) Need Integer, found %s", | ||
345 | index, | ||
346 | acpi_ut_get_object_type_name(obj_desc))); | ||
317 | return_ACPI_STATUS(AE_BAD_DATA); | 347 | return_ACPI_STATUS(AE_BAD_DATA); |
318 | } | 348 | } |
319 | 349 | ||
diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c index 98356e2482c5..e7de061cf883 100644 --- a/drivers/acpi/resources/rsdump.c +++ b/drivers/acpi/resources/rsdump.c | |||
@@ -692,7 +692,11 @@ void acpi_rs_dump_irq_list(u8 * route_table) | |||
692 | 692 | ||
693 | static void acpi_rs_out_string(char *title, char *value) | 693 | static void acpi_rs_out_string(char *title, char *value) |
694 | { | 694 | { |
695 | acpi_os_printf("%27s : %s\n", title, value); | 695 | acpi_os_printf("%27s : %s", title, value); |
696 | if (!*value) { | ||
697 | acpi_os_printf("[NULL NAMESTRING]"); | ||
698 | } | ||
699 | acpi_os_printf("\n"); | ||
696 | } | 700 | } |
697 | 701 | ||
698 | static void acpi_rs_out_integer8(char *title, u8 value) | 702 | static void acpi_rs_out_integer8(char *title, u8 value) |
diff --git a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c index e4778a51c17e..1434e786477e 100644 --- a/drivers/acpi/resources/rslist.c +++ b/drivers/acpi/resources/rslist.c | |||
@@ -94,7 +94,9 @@ acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer) | |||
94 | acpi_gbl_get_resource_dispatch | 94 | acpi_gbl_get_resource_dispatch |
95 | [resource_index]); | 95 | [resource_index]); |
96 | if (ACPI_FAILURE(status)) { | 96 | if (ACPI_FAILURE(status)) { |
97 | ACPI_REPORT_ERROR(("Could not convert AML resource (Type %X) to resource, %s\n", *aml, acpi_format_exception(status))); | 97 | ACPI_EXCEPTION((AE_INFO, status, |
98 | "Could not convert AML resource (Type %X)", | ||
99 | *aml)); | ||
98 | return_ACPI_STATUS(status); | 100 | return_ACPI_STATUS(status); |
99 | } | 101 | } |
100 | 102 | ||
@@ -156,7 +158,9 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, | |||
156 | /* Validate the (internal) Resource Type */ | 158 | /* Validate the (internal) Resource Type */ |
157 | 159 | ||
158 | if (resource->type > ACPI_RESOURCE_TYPE_MAX) { | 160 | if (resource->type > ACPI_RESOURCE_TYPE_MAX) { |
159 | ACPI_REPORT_ERROR(("Invalid descriptor type (%X) in resource list\n", resource->type)); | 161 | ACPI_ERROR((AE_INFO, |
162 | "Invalid descriptor type (%X) in resource list", | ||
163 | resource->type)); | ||
160 | return_ACPI_STATUS(AE_BAD_DATA); | 164 | return_ACPI_STATUS(AE_BAD_DATA); |
161 | } | 165 | } |
162 | 166 | ||
@@ -169,7 +173,9 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, | |||
169 | acpi_gbl_set_resource_dispatch | 173 | acpi_gbl_set_resource_dispatch |
170 | [resource->type]); | 174 | [resource->type]); |
171 | if (ACPI_FAILURE(status)) { | 175 | if (ACPI_FAILURE(status)) { |
172 | ACPI_REPORT_ERROR(("Could not convert resource (type %X) to AML, %s\n", resource->type, acpi_format_exception(status))); | 176 | ACPI_EXCEPTION((AE_INFO, status, |
177 | "Could not convert resource (type %X) to AML", | ||
178 | resource->type)); | ||
173 | return_ACPI_STATUS(status); | 179 | return_ACPI_STATUS(status); |
174 | } | 180 | } |
175 | 181 | ||
diff --git a/drivers/acpi/resources/rsmisc.c b/drivers/acpi/resources/rsmisc.c index 83bfe0dd3eba..ed866cf1c6d2 100644 --- a/drivers/acpi/resources/rsmisc.c +++ b/drivers/acpi/resources/rsmisc.c | |||
@@ -84,9 +84,11 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
84 | ACPI_FUNCTION_TRACE("rs_get_resource"); | 84 | ACPI_FUNCTION_TRACE("rs_get_resource"); |
85 | 85 | ||
86 | if (((acpi_native_uint) resource) & 0x3) { | 86 | if (((acpi_native_uint) resource) & 0x3) { |
87 | acpi_os_printf | 87 | /* Each internal resource struct is expected to be 32-bit aligned */ |
88 | ("**** GET: Misaligned resource pointer: %p Type %2.2X Len %X\n", | 88 | |
89 | resource, resource->type, resource->length); | 89 | ACPI_WARNING((AE_INFO, |
90 | "Misaligned resource pointer (get): %p Type %2.2X Len %X", | ||
91 | resource, resource->type, resource->length)); | ||
90 | } | 92 | } |
91 | 93 | ||
92 | /* Extract the resource Length field (does not include header length) */ | 94 | /* Extract the resource Length field (does not include header length) */ |
@@ -274,15 +276,16 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
274 | break; | 276 | break; |
275 | 277 | ||
276 | default: | 278 | default: |
277 | acpi_os_printf | 279 | |
278 | ("*** Invalid conversion sub-opcode\n"); | 280 | ACPI_ERROR((AE_INFO, |
281 | "Invalid conversion sub-opcode")); | ||
279 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 282 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
280 | } | 283 | } |
281 | break; | 284 | break; |
282 | 285 | ||
283 | default: | 286 | default: |
284 | 287 | ||
285 | acpi_os_printf("*** Invalid conversion opcode\n"); | 288 | ACPI_ERROR((AE_INFO, "Invalid conversion opcode")); |
286 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 289 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
287 | } | 290 | } |
288 | 291 | ||
@@ -486,15 +489,16 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
486 | break; | 489 | break; |
487 | 490 | ||
488 | default: | 491 | default: |
489 | acpi_os_printf | 492 | |
490 | ("*** Invalid conversion sub-opcode\n"); | 493 | ACPI_ERROR((AE_INFO, |
494 | "Invalid conversion sub-opcode")); | ||
491 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 495 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
492 | } | 496 | } |
493 | break; | 497 | break; |
494 | 498 | ||
495 | default: | 499 | default: |
496 | 500 | ||
497 | acpi_os_printf("*** Invalid conversion opcode\n"); | 501 | ACPI_ERROR((AE_INFO, "Invalid conversion opcode")); |
498 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 502 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
499 | } | 503 | } |
500 | 504 | ||
@@ -523,7 +527,9 @@ if (((aml->irq.flags & 0x09) == 0x00) || ((aml->irq.flags & 0x09) == 0x09)) { | |||
523 | * polarity/trigger interrupts are allowed (ACPI spec, section | 527 | * polarity/trigger interrupts are allowed (ACPI spec, section |
524 | * "IRQ Format"), so 0x00 and 0x09 are illegal. | 528 | * "IRQ Format"), so 0x00 and 0x09 are illegal. |
525 | */ | 529 | */ |
526 | ACPI_REPORT_ERROR(("Invalid interrupt polarity/trigger in resource list, %X\n", aml->irq.flags)); | 530 | ACPI_ERROR((AE_INFO, |
531 | "Invalid interrupt polarity/trigger in resource list, %X", | ||
532 | aml->irq.flags)); | ||
527 | return_ACPI_STATUS(AE_BAD_DATA); | 533 | return_ACPI_STATUS(AE_BAD_DATA); |
528 | } | 534 | } |
529 | 535 | ||
@@ -535,7 +541,7 @@ if (temp8 < 1) { | |||
535 | } | 541 | } |
536 | 542 | ||
537 | if (resource->data.dma.transfer == 0x03) { | 543 | if (resource->data.dma.transfer == 0x03) { |
538 | ACPI_REPORT_ERROR(("Invalid DMA.Transfer preference (3)\n")); | 544 | ACPI_ERROR((AE_INFO, "Invalid DMA.Transfer preference (3)")); |
539 | return_ACPI_STATUS(AE_BAD_DATA); | 545 | return_ACPI_STATUS(AE_BAD_DATA); |
540 | } | 546 | } |
541 | #endif | 547 | #endif |
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index 48290b7e6ba5..03b37d2223bc 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.c | |||
@@ -501,8 +501,8 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
501 | * at least as long as the version 1.0 FADT | 501 | * at least as long as the version 1.0 FADT |
502 | */ | 502 | */ |
503 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev1)) { | 503 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev1)) { |
504 | ACPI_REPORT_ERROR(("FADT is invalid, too short: 0x%X\n", | 504 | ACPI_ERROR((AE_INFO, "FADT is invalid, too short: 0x%X", |
505 | acpi_gbl_FADT->length)); | 505 | acpi_gbl_FADT->length)); |
506 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); | 506 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
507 | } | 507 | } |
508 | 508 | ||
@@ -517,7 +517,10 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
517 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { | 517 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { |
518 | /* Length is too short to be a V2.0 table */ | 518 | /* Length is too short to be a V2.0 table */ |
519 | 519 | ||
520 | ACPI_REPORT_WARNING(("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n", acpi_gbl_FADT->length, acpi_gbl_FADT->revision)); | 520 | ACPI_WARNING((AE_INFO, |
521 | "Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table", | ||
522 | acpi_gbl_FADT->length, | ||
523 | acpi_gbl_FADT->revision)); | ||
521 | 524 | ||
522 | acpi_tb_convert_fadt1(local_fadt, | 525 | acpi_tb_convert_fadt1(local_fadt, |
523 | (void *)acpi_gbl_FADT); | 526 | (void *)acpi_gbl_FADT); |
@@ -582,13 +585,15 @@ acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info) | |||
582 | /* Absolute minimum length is 24, but the ACPI spec says 64 */ | 585 | /* Absolute minimum length is 24, but the ACPI spec says 64 */ |
583 | 586 | ||
584 | if (acpi_gbl_FACS->length < 24) { | 587 | if (acpi_gbl_FACS->length < 24) { |
585 | ACPI_REPORT_ERROR(("Invalid FACS table length: 0x%X\n", | 588 | ACPI_ERROR((AE_INFO, "Invalid FACS table length: 0x%X", |
586 | acpi_gbl_FACS->length)); | 589 | acpi_gbl_FACS->length)); |
587 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); | 590 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
588 | } | 591 | } |
589 | 592 | ||
590 | if (acpi_gbl_FACS->length < 64) { | 593 | if (acpi_gbl_FACS->length < 64) { |
591 | ACPI_REPORT_WARNING(("FACS is shorter than the ACPI specification allows: 0x%X, using anyway\n", acpi_gbl_FACS->length)); | 594 | ACPI_WARNING((AE_INFO, |
595 | "FACS is shorter than the ACPI specification allows: 0x%X, using anyway", | ||
596 | acpi_gbl_FACS->length)); | ||
592 | } | 597 | } |
593 | 598 | ||
594 | /* Copy fields to the new FACS */ | 599 | /* Copy fields to the new FACS */ |
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 0fedf4b27ea5..09b4ee6dfd60 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c | |||
@@ -91,9 +91,9 @@ acpi_tb_get_table(struct acpi_pointer *address, | |||
91 | 91 | ||
92 | status = acpi_tb_get_table_body(address, &header, table_info); | 92 | status = acpi_tb_get_table_body(address, &header, table_info); |
93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
94 | ACPI_REPORT_ERROR(("Could not get ACPI table (size %X), %s\n", | 94 | ACPI_EXCEPTION((AE_INFO, status, |
95 | header.length, | 95 | "Could not get ACPI table (size %X)", |
96 | acpi_format_exception(status))); | 96 | header.length)); |
97 | return_ACPI_STATUS(status); | 97 | return_ACPI_STATUS(status); |
98 | } | 98 | } |
99 | 99 | ||
@@ -148,7 +148,6 @@ acpi_tb_get_table_header(struct acpi_pointer *address, | |||
148 | sizeof(struct acpi_table_header), | 148 | sizeof(struct acpi_table_header), |
149 | (void *)&header); | 149 | (void *)&header); |
150 | if (ACPI_FAILURE(status)) { | 150 | if (ACPI_FAILURE(status)) { |
151 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X%8.8X for length %X\n", ACPI_FORMAT_UINT64(address->pointer.physical), sizeof(struct acpi_table_header))); | ||
152 | return_ACPI_STATUS(status); | 151 | return_ACPI_STATUS(status); |
153 | } | 152 | } |
154 | 153 | ||
@@ -161,8 +160,8 @@ acpi_tb_get_table_header(struct acpi_pointer *address, | |||
161 | 160 | ||
162 | default: | 161 | default: |
163 | 162 | ||
164 | ACPI_REPORT_ERROR(("Invalid address flags %X\n", | 163 | ACPI_ERROR((AE_INFO, "Invalid address flags %X", |
165 | address->pointer_type)); | 164 | address->pointer_type)); |
166 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 165 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
167 | } | 166 | } |
168 | 167 | ||
@@ -253,8 +252,8 @@ acpi_tb_table_override(struct acpi_table_header *header, | |||
253 | if (ACPI_FAILURE(status)) { | 252 | if (ACPI_FAILURE(status)) { |
254 | /* Some severe error from the OSL, but we basically ignore it */ | 253 | /* Some severe error from the OSL, but we basically ignore it */ |
255 | 254 | ||
256 | ACPI_REPORT_ERROR(("Could not override ACPI table, %s\n", | 255 | ACPI_EXCEPTION((AE_INFO, status, |
257 | acpi_format_exception(status))); | 256 | "Could not override ACPI table")); |
258 | return_ACPI_STATUS(status); | 257 | return_ACPI_STATUS(status); |
259 | } | 258 | } |
260 | 259 | ||
@@ -273,15 +272,14 @@ acpi_tb_table_override(struct acpi_table_header *header, | |||
273 | 272 | ||
274 | status = acpi_tb_get_this_table(&address, new_table, table_info); | 273 | status = acpi_tb_get_this_table(&address, new_table, table_info); |
275 | if (ACPI_FAILURE(status)) { | 274 | if (ACPI_FAILURE(status)) { |
276 | ACPI_REPORT_ERROR(("Could not copy override ACPI table, %s\n", | 275 | ACPI_EXCEPTION((AE_INFO, status, "Could not copy ACPI table")); |
277 | acpi_format_exception(status))); | ||
278 | return_ACPI_STATUS(status); | 276 | return_ACPI_STATUS(status); |
279 | } | 277 | } |
280 | 278 | ||
281 | /* Copy the table info */ | 279 | /* Copy the table info */ |
282 | 280 | ||
283 | ACPI_REPORT_INFO(("Table [%4.4s] replaced by host OS\n", | 281 | ACPI_INFO((AE_INFO, "Table [%4.4s] replaced by host OS", |
284 | table_info->pointer->signature)); | 282 | table_info->pointer->signature)); |
285 | 283 | ||
286 | return_ACPI_STATUS(AE_OK); | 284 | return_ACPI_STATUS(AE_OK); |
287 | } | 285 | } |
@@ -327,7 +325,9 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
327 | 325 | ||
328 | full_table = ACPI_MEM_ALLOCATE(header->length); | 326 | full_table = ACPI_MEM_ALLOCATE(header->length); |
329 | if (!full_table) { | 327 | if (!full_table) { |
330 | ACPI_REPORT_ERROR(("Could not allocate table memory for [%4.4s] length %X\n", header->signature, header->length)); | 328 | ACPI_ERROR((AE_INFO, |
329 | "Could not allocate table memory for [%4.4s] length %X", | ||
330 | header->signature, header->length)); | ||
331 | return_ACPI_STATUS(AE_NO_MEMORY); | 331 | return_ACPI_STATUS(AE_NO_MEMORY); |
332 | } | 332 | } |
333 | 333 | ||
@@ -351,7 +351,12 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
351 | (acpi_size) header->length, | 351 | (acpi_size) header->length, |
352 | (void *)&full_table); | 352 | (void *)&full_table); |
353 | if (ACPI_FAILURE(status)) { | 353 | if (ACPI_FAILURE(status)) { |
354 | ACPI_REPORT_ERROR(("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n", header->signature, ACPI_FORMAT_UINT64(address->pointer.physical), header->length)); | 354 | ACPI_ERROR((AE_INFO, |
355 | "Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X", | ||
356 | header->signature, | ||
357 | ACPI_FORMAT_UINT64(address->pointer. | ||
358 | physical), | ||
359 | header->length)); | ||
355 | return (status); | 360 | return (status); |
356 | } | 361 | } |
357 | 362 | ||
@@ -362,8 +367,8 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
362 | 367 | ||
363 | default: | 368 | default: |
364 | 369 | ||
365 | ACPI_REPORT_ERROR(("Invalid address flags %X\n", | 370 | ACPI_ERROR((AE_INFO, "Invalid address flags %X", |
366 | address->pointer_type)); | 371 | address->pointer_type)); |
367 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 372 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
368 | } | 373 | } |
369 | 374 | ||
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c index 496f336b3e3a..134e5dce0bc1 100644 --- a/drivers/acpi/tables/tbgetall.c +++ b/drivers/acpi/tables/tbgetall.c | |||
@@ -152,7 +152,9 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address, | |||
152 | /* Signature must match request */ | 152 | /* Signature must match request */ |
153 | 153 | ||
154 | if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) { | 154 | if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) { |
155 | ACPI_REPORT_ERROR(("Incorrect table signature - wanted [%s] found [%4.4s]\n", signature, header.signature)); | 155 | ACPI_ERROR((AE_INFO, |
156 | "Incorrect table signature - wanted [%s] found [%4.4s]", | ||
157 | signature, header.signature)); | ||
156 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | 158 | return_ACPI_STATUS(AE_BAD_SIGNATURE); |
157 | } | 159 | } |
158 | 160 | ||
@@ -231,14 +233,18 @@ acpi_status acpi_tb_get_required_tables(void) | |||
231 | */ | 233 | */ |
232 | status = acpi_tb_get_primary_table(&address, &table_info); | 234 | status = acpi_tb_get_primary_table(&address, &table_info); |
233 | if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) { | 235 | if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) { |
234 | ACPI_REPORT_WARNING(("%s, while getting table at %8.8X%8.8X\n", acpi_format_exception(status), ACPI_FORMAT_UINT64(address.pointer.value))); | 236 | ACPI_WARNING((AE_INFO, |
237 | "%s, while getting table at %8.8X%8.8X", | ||
238 | acpi_format_exception(status), | ||
239 | ACPI_FORMAT_UINT64(address.pointer. | ||
240 | value))); | ||
235 | } | 241 | } |
236 | } | 242 | } |
237 | 243 | ||
238 | /* We must have a FADT to continue */ | 244 | /* We must have a FADT to continue */ |
239 | 245 | ||
240 | if (!acpi_gbl_FADT) { | 246 | if (!acpi_gbl_FADT) { |
241 | ACPI_REPORT_ERROR(("No FADT present in RSDT/XSDT\n")); | 247 | ACPI_ERROR((AE_INFO, "No FADT present in RSDT/XSDT")); |
242 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 248 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
243 | } | 249 | } |
244 | 250 | ||
@@ -248,7 +254,8 @@ acpi_status acpi_tb_get_required_tables(void) | |||
248 | */ | 254 | */ |
249 | status = acpi_tb_convert_table_fadt(); | 255 | status = acpi_tb_convert_table_fadt(); |
250 | if (ACPI_FAILURE(status)) { | 256 | if (ACPI_FAILURE(status)) { |
251 | ACPI_REPORT_ERROR(("Could not convert FADT to internal common format\n")); | 257 | ACPI_ERROR((AE_INFO, |
258 | "Could not convert FADT to internal common format")); | ||
252 | return_ACPI_STATUS(status); | 259 | return_ACPI_STATUS(status); |
253 | } | 260 | } |
254 | 261 | ||
@@ -258,8 +265,8 @@ acpi_status acpi_tb_get_required_tables(void) | |||
258 | 265 | ||
259 | status = acpi_tb_get_secondary_table(&address, FACS_SIG, &table_info); | 266 | status = acpi_tb_get_secondary_table(&address, FACS_SIG, &table_info); |
260 | if (ACPI_FAILURE(status)) { | 267 | if (ACPI_FAILURE(status)) { |
261 | ACPI_REPORT_ERROR(("Could not get/install the FACS, %s\n", | 268 | ACPI_EXCEPTION((AE_INFO, status, |
262 | acpi_format_exception(status))); | 269 | "Could not get/install the FACS")); |
263 | return_ACPI_STATUS(status); | 270 | return_ACPI_STATUS(status); |
264 | } | 271 | } |
265 | 272 | ||
@@ -278,7 +285,7 @@ acpi_status acpi_tb_get_required_tables(void) | |||
278 | 285 | ||
279 | status = acpi_tb_get_secondary_table(&address, DSDT_SIG, &table_info); | 286 | status = acpi_tb_get_secondary_table(&address, DSDT_SIG, &table_info); |
280 | if (ACPI_FAILURE(status)) { | 287 | if (ACPI_FAILURE(status)) { |
281 | ACPI_REPORT_ERROR(("Could not get/install the DSDT\n")); | 288 | ACPI_ERROR((AE_INFO, "Could not get/install the DSDT")); |
282 | return_ACPI_STATUS(status); | 289 | return_ACPI_STATUS(status); |
283 | } | 290 | } |
284 | 291 | ||
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index e1c9faa3982e..7ffd0fddb4e5 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -128,8 +128,8 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info) | |||
128 | 128 | ||
129 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 129 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
130 | if (ACPI_FAILURE(status)) { | 130 | if (ACPI_FAILURE(status)) { |
131 | ACPI_REPORT_ERROR(("Could not acquire table mutex, %s\n", | 131 | ACPI_EXCEPTION((AE_INFO, status, |
132 | acpi_format_exception(status))); | 132 | "Could not acquire table mutex")); |
133 | return_ACPI_STATUS(status); | 133 | return_ACPI_STATUS(status); |
134 | } | 134 | } |
135 | 135 | ||
@@ -146,9 +146,9 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info) | |||
146 | 146 | ||
147 | status = acpi_tb_init_table_descriptor(table_info->type, table_info); | 147 | status = acpi_tb_init_table_descriptor(table_info->type, table_info); |
148 | if (ACPI_FAILURE(status)) { | 148 | if (ACPI_FAILURE(status)) { |
149 | ACPI_REPORT_ERROR(("Could not install table [%4.4s], %s\n", | 149 | ACPI_EXCEPTION((AE_INFO, status, |
150 | table_info->pointer->signature, | 150 | "Could not install table [%4.4s]", |
151 | acpi_format_exception(status))); | 151 | table_info->pointer->signature)); |
152 | } | 152 | } |
153 | 153 | ||
154 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s located at %p\n", | 154 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s located at %p\n", |
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index 178309026850..4d308220225d 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c | |||
@@ -192,16 +192,21 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) | |||
192 | if (no_match) { | 192 | if (no_match) { |
193 | /* Invalid RSDT or XSDT signature */ | 193 | /* Invalid RSDT or XSDT signature */ |
194 | 194 | ||
195 | ACPI_REPORT_ERROR(("Invalid signature where RSDP indicates RSDT/XSDT should be located. RSDP:\n")); | 195 | ACPI_ERROR((AE_INFO, |
196 | "Invalid signature where RSDP indicates RSDT/XSDT should be located. RSDP:")); | ||
196 | 197 | ||
197 | ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); | 198 | ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); |
198 | 199 | ||
199 | ACPI_REPORT_ERROR(("RSDT/XSDT signature at %X (%p) is invalid\n", acpi_gbl_RSDP->rsdt_physical_address, (void *)(acpi_native_uint) acpi_gbl_RSDP->rsdt_physical_address)); | 200 | ACPI_ERROR((AE_INFO, |
201 | "RSDT/XSDT signature at %X (%p) is invalid", | ||
202 | acpi_gbl_RSDP->rsdt_physical_address, | ||
203 | (void *)(acpi_native_uint) acpi_gbl_RSDP-> | ||
204 | rsdt_physical_address)); | ||
200 | 205 | ||
201 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { | 206 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { |
202 | ACPI_REPORT_ERROR(("Looking for RSDT\n")) | 207 | ACPI_ERROR((AE_INFO, "Looking for RSDT")); |
203 | } else { | 208 | } else { |
204 | ACPI_REPORT_ERROR(("Looking for XSDT\n")) | 209 | ACPI_ERROR((AE_INFO, "Looking for XSDT")); |
205 | } | 210 | } |
206 | 211 | ||
207 | ACPI_DUMP_BUFFER((char *)table_ptr, 48); | 212 | ACPI_DUMP_BUFFER((char *)table_ptr, 48); |
@@ -238,9 +243,8 @@ acpi_status acpi_tb_get_table_rsdt(void) | |||
238 | table_info.type = ACPI_TABLE_XSDT; | 243 | table_info.type = ACPI_TABLE_XSDT; |
239 | status = acpi_tb_get_table(&address, &table_info); | 244 | status = acpi_tb_get_table(&address, &table_info); |
240 | if (ACPI_FAILURE(status)) { | 245 | if (ACPI_FAILURE(status)) { |
241 | ACPI_REPORT_ERROR(("Could not get the RSDT/XSDT, %s\n", | 246 | ACPI_EXCEPTION((AE_INFO, status, |
242 | acpi_format_exception(status))); | 247 | "Could not get the RSDT/XSDT")); |
243 | |||
244 | return_ACPI_STATUS(status); | 248 | return_ACPI_STATUS(status); |
245 | } | 249 | } |
246 | 250 | ||
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 38c6749e43d5..bc571592f087 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c | |||
@@ -149,8 +149,8 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) | |||
149 | /* Verify that this is a valid address */ | 149 | /* Verify that this is a valid address */ |
150 | 150 | ||
151 | if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) { | 151 | if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) { |
152 | ACPI_REPORT_ERROR(("Cannot read table header at %p\n", | 152 | ACPI_ERROR((AE_INFO, |
153 | table_header)); | 153 | "Cannot read table header at %p", table_header)); |
154 | 154 | ||
155 | return (AE_BAD_ADDRESS); | 155 | return (AE_BAD_ADDRESS); |
156 | } | 156 | } |
@@ -159,10 +159,12 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) | |||
159 | 159 | ||
160 | ACPI_MOVE_32_TO_32(&signature, table_header->signature); | 160 | ACPI_MOVE_32_TO_32(&signature, table_header->signature); |
161 | if (!acpi_ut_valid_acpi_name(signature)) { | 161 | if (!acpi_ut_valid_acpi_name(signature)) { |
162 | ACPI_REPORT_ERROR(("Table signature at %p [%p] has invalid characters\n", table_header, &signature)); | 162 | ACPI_ERROR((AE_INFO, |
163 | "Table signature at %p [%p] has invalid characters", | ||
164 | table_header, &signature)); | ||
163 | 165 | ||
164 | ACPI_REPORT_WARNING(("Invalid table signature found: [%4.4s]\n", | 166 | ACPI_WARNING((AE_INFO, "Invalid table signature found: [%4.4s]", |
165 | ACPI_CAST_PTR(char, &signature))); | 167 | ACPI_CAST_PTR(char, &signature))); |
166 | 168 | ||
167 | ACPI_DUMP_BUFFER(table_header, | 169 | ACPI_DUMP_BUFFER(table_header, |
168 | sizeof(struct acpi_table_header)); | 170 | sizeof(struct acpi_table_header)); |
@@ -172,9 +174,13 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) | |||
172 | /* Validate the table length */ | 174 | /* Validate the table length */ |
173 | 175 | ||
174 | if (table_header->length < sizeof(struct acpi_table_header)) { | 176 | if (table_header->length < sizeof(struct acpi_table_header)) { |
175 | ACPI_REPORT_ERROR(("Invalid length in table header %p name %4.4s\n", table_header, (char *)&signature)); | 177 | ACPI_ERROR((AE_INFO, |
178 | "Invalid length in table header %p name %4.4s", | ||
179 | table_header, (char *)&signature)); | ||
176 | 180 | ||
177 | ACPI_REPORT_WARNING(("Invalid table header length (0x%X) found\n", (u32) table_header->length)); | 181 | ACPI_WARNING((AE_INFO, |
182 | "Invalid table header length (0x%X) found", | ||
183 | (u32) table_header->length)); | ||
178 | 184 | ||
179 | ACPI_DUMP_BUFFER(table_header, | 185 | ACPI_DUMP_BUFFER(table_header, |
180 | sizeof(struct acpi_table_header)); | 186 | sizeof(struct acpi_table_header)); |
@@ -213,7 +219,10 @@ acpi_tb_verify_table_checksum(struct acpi_table_header * table_header) | |||
213 | /* Return the appropriate exception */ | 219 | /* Return the appropriate exception */ |
214 | 220 | ||
215 | if (checksum) { | 221 | if (checksum) { |
216 | ACPI_REPORT_WARNING(("Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)\n", table_header->signature, (u32) table_header->checksum, (u32) checksum)); | 222 | ACPI_WARNING((AE_INFO, |
223 | "Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)", | ||
224 | table_header->signature, | ||
225 | (u32) table_header->checksum, (u32) checksum)); | ||
217 | 226 | ||
218 | status = AE_BAD_CHECKSUM; | 227 | status = AE_BAD_CHECKSUM; |
219 | } | 228 | } |
@@ -286,7 +295,7 @@ acpi_tb_handle_to_object(u16 table_id, | |||
286 | } | 295 | } |
287 | } | 296 | } |
288 | 297 | ||
289 | ACPI_REPORT_ERROR(("table_id=%X does not exist\n", table_id)); | 298 | ACPI_ERROR((AE_INFO, "table_id=%X does not exist", table_id)); |
290 | return (AE_BAD_PARAMETER); | 299 | return (AE_BAD_PARAMETER); |
291 | } | 300 | } |
292 | #endif | 301 | #endif |
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 83a9ca8cb98c..9fe53c9d5b9a 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -75,8 +75,7 @@ acpi_status acpi_load_tables(void) | |||
75 | status = acpi_os_get_root_pointer(ACPI_LOGICAL_ADDRESSING, | 75 | status = acpi_os_get_root_pointer(ACPI_LOGICAL_ADDRESSING, |
76 | &rsdp_address); | 76 | &rsdp_address); |
77 | if (ACPI_FAILURE(status)) { | 77 | if (ACPI_FAILURE(status)) { |
78 | ACPI_REPORT_ERROR(("Could not get RSDP, %s\n", | 78 | ACPI_EXCEPTION((AE_INFO, status, "Could not get the RSDP")); |
79 | acpi_format_exception(status))); | ||
80 | goto error_exit; | 79 | goto error_exit; |
81 | } | 80 | } |
82 | 81 | ||
@@ -86,8 +85,7 @@ acpi_status acpi_load_tables(void) | |||
86 | 85 | ||
87 | status = acpi_tb_verify_rsdp(&rsdp_address); | 86 | status = acpi_tb_verify_rsdp(&rsdp_address); |
88 | if (ACPI_FAILURE(status)) { | 87 | if (ACPI_FAILURE(status)) { |
89 | ACPI_REPORT_ERROR(("RSDP Failed validation: %s\n", | 88 | ACPI_EXCEPTION((AE_INFO, status, "During RSDP validation")); |
90 | acpi_format_exception(status))); | ||
91 | goto error_exit; | 89 | goto error_exit; |
92 | } | 90 | } |
93 | 91 | ||
@@ -95,8 +93,7 @@ acpi_status acpi_load_tables(void) | |||
95 | 93 | ||
96 | status = acpi_tb_get_table_rsdt(); | 94 | status = acpi_tb_get_table_rsdt(); |
97 | if (ACPI_FAILURE(status)) { | 95 | if (ACPI_FAILURE(status)) { |
98 | ACPI_REPORT_ERROR(("Could not load RSDT: %s\n", | 96 | ACPI_EXCEPTION((AE_INFO, status, "Could not load RSDT")); |
99 | acpi_format_exception(status))); | ||
100 | goto error_exit; | 97 | goto error_exit; |
101 | } | 98 | } |
102 | 99 | ||
@@ -104,7 +101,8 @@ acpi_status acpi_load_tables(void) | |||
104 | 101 | ||
105 | status = acpi_tb_get_required_tables(); | 102 | status = acpi_tb_get_required_tables(); |
106 | if (ACPI_FAILURE(status)) { | 103 | if (ACPI_FAILURE(status)) { |
107 | ACPI_REPORT_ERROR(("Could not get all required tables (DSDT/FADT/FACS): %s\n", acpi_format_exception(status))); | 104 | ACPI_EXCEPTION((AE_INFO, status, |
105 | "Could not get all required tables (DSDT/FADT/FACS)")); | ||
108 | goto error_exit; | 106 | goto error_exit; |
109 | } | 107 | } |
110 | 108 | ||
@@ -114,17 +112,14 @@ acpi_status acpi_load_tables(void) | |||
114 | 112 | ||
115 | status = acpi_ns_load_namespace(); | 113 | status = acpi_ns_load_namespace(); |
116 | if (ACPI_FAILURE(status)) { | 114 | if (ACPI_FAILURE(status)) { |
117 | ACPI_REPORT_ERROR(("Could not load namespace: %s\n", | 115 | ACPI_EXCEPTION((AE_INFO, status, "Could not load namespace")); |
118 | acpi_format_exception(status))); | ||
119 | goto error_exit; | 116 | goto error_exit; |
120 | } | 117 | } |
121 | 118 | ||
122 | return_ACPI_STATUS(AE_OK); | 119 | return_ACPI_STATUS(AE_OK); |
123 | 120 | ||
124 | error_exit: | 121 | error_exit: |
125 | ACPI_REPORT_ERROR(("Could not load tables: %s\n", | 122 | ACPI_EXCEPTION((AE_INFO, status, "Could not load tables")); |
126 | acpi_format_exception(status))); | ||
127 | |||
128 | return_ACPI_STATUS(status); | 123 | return_ACPI_STATUS(status); |
129 | } | 124 | } |
130 | 125 | ||
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 6538ed818f5b..a62db6af83c9 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c | |||
@@ -396,8 +396,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | |||
396 | 396 | ||
397 | status = acpi_tb_find_rsdp(&table_info, flags); | 397 | status = acpi_tb_find_rsdp(&table_info, flags); |
398 | if (ACPI_FAILURE(status)) { | 398 | if (ACPI_FAILURE(status)) { |
399 | ACPI_REPORT_ERROR(("RSDP structure not found, %s Flags=%X\n", | 399 | ACPI_EXCEPTION((AE_INFO, status, |
400 | acpi_format_exception(status), flags)); | 400 | "RSDP structure not found - Flags=%X", flags)); |
401 | 401 | ||
402 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 402 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
403 | } | 403 | } |
@@ -502,7 +502,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
502 | ACPI_EBDA_PTR_LENGTH, | 502 | ACPI_EBDA_PTR_LENGTH, |
503 | (void *)&table_ptr); | 503 | (void *)&table_ptr); |
504 | if (ACPI_FAILURE(status)) { | 504 | if (ACPI_FAILURE(status)) { |
505 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X for length %X\n", ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH)); | 505 | ACPI_ERROR((AE_INFO, |
506 | "Could not map memory at %8.8X for length %X", | ||
507 | ACPI_EBDA_PTR_LOCATION, | ||
508 | ACPI_EBDA_PTR_LENGTH)); | ||
506 | 509 | ||
507 | return_ACPI_STATUS(status); | 510 | return_ACPI_STATUS(status); |
508 | } | 511 | } |
@@ -526,7 +529,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
526 | ACPI_EBDA_WINDOW_SIZE, | 529 | ACPI_EBDA_WINDOW_SIZE, |
527 | (void *)&table_ptr); | 530 | (void *)&table_ptr); |
528 | if (ACPI_FAILURE(status)) { | 531 | if (ACPI_FAILURE(status)) { |
529 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X for length %X\n", physical_address, ACPI_EBDA_WINDOW_SIZE)); | 532 | ACPI_ERROR((AE_INFO, |
533 | "Could not map memory at %8.8X for length %X", | ||
534 | physical_address, | ||
535 | ACPI_EBDA_WINDOW_SIZE)); | ||
530 | 536 | ||
531 | return_ACPI_STATUS(status); | 537 | return_ACPI_STATUS(status); |
532 | } | 538 | } |
@@ -556,7 +562,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
556 | (void *)&table_ptr); | 562 | (void *)&table_ptr); |
557 | 563 | ||
558 | if (ACPI_FAILURE(status)) { | 564 | if (ACPI_FAILURE(status)) { |
559 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X for length %X\n", ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE)); | 565 | ACPI_ERROR((AE_INFO, |
566 | "Could not map memory at %8.8X for length %X", | ||
567 | ACPI_HI_RSDP_WINDOW_BASE, | ||
568 | ACPI_HI_RSDP_WINDOW_SIZE)); | ||
560 | 569 | ||
561 | return_ACPI_STATUS(status); | 570 | return_ACPI_STATUS(status); |
562 | } | 571 | } |
@@ -625,7 +634,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
625 | 634 | ||
626 | /* A valid RSDP was not found */ | 635 | /* A valid RSDP was not found */ |
627 | 636 | ||
628 | ACPI_REPORT_ERROR(("No valid RSDP was found\n")); | 637 | ACPI_ERROR((AE_INFO, "No valid RSDP was found")); |
629 | return_ACPI_STATUS(AE_NOT_FOUND); | 638 | return_ACPI_STATUS(AE_NOT_FOUND); |
630 | } | 639 | } |
631 | 640 | ||
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index 0efcbdf7e620..03b0044974c2 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c | |||
@@ -301,8 +301,8 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) | |||
301 | /* Check for an inadvertent size of zero bytes */ | 301 | /* Check for an inadvertent size of zero bytes */ |
302 | 302 | ||
303 | if (!size) { | 303 | if (!size) { |
304 | _ACPI_REPORT_ERROR(module, line, | 304 | ACPI_ERROR((module, line, |
305 | ("ut_allocate: Attempt to allocate zero bytes, allocating 1 byte\n")); | 305 | "ut_allocate: Attempt to allocate zero bytes, allocating 1 byte")); |
306 | size = 1; | 306 | size = 1; |
307 | } | 307 | } |
308 | 308 | ||
@@ -310,9 +310,9 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) | |||
310 | if (!allocation) { | 310 | if (!allocation) { |
311 | /* Report allocation error */ | 311 | /* Report allocation error */ |
312 | 312 | ||
313 | _ACPI_REPORT_ERROR(module, line, | 313 | ACPI_ERROR((module, line, |
314 | ("ut_allocate: Could not allocate size %X\n", | 314 | "ut_allocate: Could not allocate size %X", |
315 | (u32) size)); | 315 | (u32) size)); |
316 | 316 | ||
317 | return_PTR(NULL); | 317 | return_PTR(NULL); |
318 | } | 318 | } |
@@ -344,8 +344,8 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line) | |||
344 | /* Check for an inadvertent size of zero bytes */ | 344 | /* Check for an inadvertent size of zero bytes */ |
345 | 345 | ||
346 | if (!size) { | 346 | if (!size) { |
347 | _ACPI_REPORT_ERROR(module, line, | 347 | ACPI_ERROR((module, line, |
348 | ("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n")); | 348 | "Attempt to allocate zero bytes, allocating 1 byte")); |
349 | size = 1; | 349 | size = 1; |
350 | } | 350 | } |
351 | 351 | ||
@@ -353,9 +353,8 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line) | |||
353 | if (!allocation) { | 353 | if (!allocation) { |
354 | /* Report allocation error */ | 354 | /* Report allocation error */ |
355 | 355 | ||
356 | _ACPI_REPORT_ERROR(module, line, | 356 | ACPI_ERROR((module, line, |
357 | ("ut_callocate: Could not allocate size %X\n", | 357 | "Could not allocate size %X", (u32) size)); |
358 | (u32) size)); | ||
359 | return_PTR(NULL); | 358 | return_PTR(NULL); |
360 | } | 359 | } |
361 | 360 | ||
@@ -480,9 +479,8 @@ void *acpi_ut_callocate_and_track(acpi_size size, | |||
480 | if (!allocation) { | 479 | if (!allocation) { |
481 | /* Report allocation error */ | 480 | /* Report allocation error */ |
482 | 481 | ||
483 | _ACPI_REPORT_ERROR(module, line, | 482 | ACPI_ERROR((module, line, |
484 | ("ut_callocate: Could not allocate size %X\n", | 483 | "Could not allocate size %X", (u32) size)); |
485 | (u32) size)); | ||
486 | return (NULL); | 484 | return (NULL); |
487 | } | 485 | } |
488 | 486 | ||
@@ -524,8 +522,7 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line) | |||
524 | ACPI_FUNCTION_TRACE_PTR("ut_free", allocation); | 522 | ACPI_FUNCTION_TRACE_PTR("ut_free", allocation); |
525 | 523 | ||
526 | if (NULL == allocation) { | 524 | if (NULL == allocation) { |
527 | _ACPI_REPORT_ERROR(module, line, | 525 | ACPI_ERROR((module, line, "Attempt to delete a NULL address")); |
528 | ("acpi_ut_free: Attempt to delete a NULL address\n")); | ||
529 | 526 | ||
530 | return_VOID; | 527 | return_VOID; |
531 | } | 528 | } |
@@ -540,14 +537,11 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line) | |||
540 | status = acpi_ut_remove_allocation(debug_block, | 537 | status = acpi_ut_remove_allocation(debug_block, |
541 | component, module, line); | 538 | component, module, line); |
542 | if (ACPI_FAILURE(status)) { | 539 | if (ACPI_FAILURE(status)) { |
543 | ACPI_REPORT_ERROR(("Could not free memory, %s\n", | 540 | ACPI_EXCEPTION((AE_INFO, status, "Could not free memory")); |
544 | acpi_format_exception(status))); | ||
545 | } | 541 | } |
546 | 542 | ||
547 | acpi_os_free(debug_block); | 543 | acpi_os_free(debug_block); |
548 | |||
549 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p freed\n", allocation)); | 544 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p freed\n", allocation)); |
550 | |||
551 | return_VOID; | 545 | return_VOID; |
552 | } | 546 | } |
553 | 547 | ||
@@ -624,10 +618,12 @@ acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation, | |||
624 | */ | 618 | */ |
625 | element = acpi_ut_find_allocation(allocation); | 619 | element = acpi_ut_find_allocation(allocation); |
626 | if (element) { | 620 | if (element) { |
627 | ACPI_REPORT_ERROR(("ut_track_allocation: Allocation already present in list! (%p)\n", allocation)); | 621 | ACPI_ERROR((AE_INFO, |
622 | "ut_track_allocation: Allocation already present in list! (%p)", | ||
623 | allocation)); | ||
628 | 624 | ||
629 | ACPI_REPORT_ERROR(("Element %p Address %p\n", | 625 | ACPI_ERROR((AE_INFO, "Element %p Address %p", |
630 | element, allocation)); | 626 | element, allocation)); |
631 | 627 | ||
632 | goto unlock_and_exit; | 628 | goto unlock_and_exit; |
633 | } | 629 | } |
@@ -687,8 +683,8 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation, | |||
687 | if (NULL == mem_list->list_head) { | 683 | if (NULL == mem_list->list_head) { |
688 | /* No allocations! */ | 684 | /* No allocations! */ |
689 | 685 | ||
690 | _ACPI_REPORT_ERROR(module, line, | 686 | ACPI_ERROR((module, line, |
691 | ("ut_remove_allocation: Empty allocation list, nothing to free!\n")); | 687 | "Empty allocation list, nothing to free!")); |
692 | 688 | ||
693 | return_ACPI_STATUS(AE_OK); | 689 | return_ACPI_STATUS(AE_OK); |
694 | } | 690 | } |
@@ -863,10 +859,11 @@ void acpi_ut_dump_allocations(u32 component, char *module) | |||
863 | /* Print summary */ | 859 | /* Print summary */ |
864 | 860 | ||
865 | if (!num_outstanding) { | 861 | if (!num_outstanding) { |
866 | ACPI_REPORT_INFO(("No outstanding allocations\n")); | 862 | ACPI_INFO((AE_INFO, "No outstanding allocations")); |
867 | } else { | 863 | } else { |
868 | ACPI_REPORT_ERROR(("%d(%X) Outstanding allocations\n", | 864 | ACPI_ERROR((AE_INFO, |
869 | num_outstanding, num_outstanding)); | 865 | "%d(%X) Outstanding allocations", |
866 | num_outstanding, num_outstanding)); | ||
870 | } | 867 | } |
871 | 868 | ||
872 | return_VOID; | 869 | return_VOID; |
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 1a4da006822a..df2d32096b72 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c | |||
@@ -606,7 +606,8 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object, | |||
606 | /* | 606 | /* |
607 | * Packages as external input to control methods are not supported, | 607 | * Packages as external input to control methods are not supported, |
608 | */ | 608 | */ |
609 | ACPI_REPORT_ERROR(("Packages as parameters not implemented!\n")); | 609 | ACPI_ERROR((AE_INFO, |
610 | "Packages as parameters not implemented!")); | ||
610 | 611 | ||
611 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); | 612 | return_ACPI_STATUS(AE_NOT_IMPLEMENTED); |
612 | } | 613 | } |
@@ -869,7 +870,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, | |||
869 | count + | 870 | count + |
870 | 1) * sizeof(void *)); | 871 | 1) * sizeof(void *)); |
871 | if (!dest_obj->package.elements) { | 872 | if (!dest_obj->package.elements) { |
872 | ACPI_REPORT_ERROR(("Package allocation failure\n")); | 873 | ACPI_ERROR((AE_INFO, "Package allocation failure")); |
873 | return_ACPI_STATUS(AE_NO_MEMORY); | 874 | return_ACPI_STATUS(AE_NO_MEMORY); |
874 | } | 875 | } |
875 | 876 | ||
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 1079a1a1f195..1db9695b0029 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -363,7 +363,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
363 | 363 | ||
364 | default: | 364 | default: |
365 | 365 | ||
366 | ACPI_REPORT_ERROR(("Unknown action (%X)\n", action)); | 366 | ACPI_ERROR((AE_INFO, "Unknown action (%X)", action)); |
367 | break; | 367 | break; |
368 | } | 368 | } |
369 | 369 | ||
@@ -373,7 +373,9 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
373 | */ | 373 | */ |
374 | if (count > ACPI_MAX_REFERENCE_COUNT) { | 374 | if (count > ACPI_MAX_REFERENCE_COUNT) { |
375 | 375 | ||
376 | ACPI_REPORT_WARNING(("Large Reference Count (%X) in object %p\n\n", count, object)); | 376 | ACPI_WARNING((AE_INFO, |
377 | "Large Reference Count (%X) in object %p", | ||
378 | count, object)); | ||
377 | } | 379 | } |
378 | 380 | ||
379 | return; | 381 | return; |
@@ -532,8 +534,8 @@ acpi_ut_update_object_reference(union acpi_operand_object * object, u16 action) | |||
532 | 534 | ||
533 | error_exit: | 535 | error_exit: |
534 | 536 | ||
535 | ACPI_REPORT_ERROR(("Could not update object reference count, %s\n", | 537 | ACPI_EXCEPTION((AE_INFO, status, |
536 | acpi_format_exception(status))); | 538 | "Could not update object reference count")); |
537 | 539 | ||
538 | return_ACPI_STATUS(status); | 540 | return_ACPI_STATUS(status); |
539 | } | 541 | } |
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index f4dc374a0eec..106cc97cb4af 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c | |||
@@ -154,8 +154,8 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, | |||
154 | acpi_ut_get_node_name(prefix_node), | 154 | acpi_ut_get_node_name(prefix_node), |
155 | path)); | 155 | path)); |
156 | } else { | 156 | } else { |
157 | ACPI_REPORT_MTERROR("Method execution failed", | 157 | ACPI_ERROR_METHOD("Method execution failed", |
158 | prefix_node, path, status); | 158 | prefix_node, path, status); |
159 | } | 159 | } |
160 | 160 | ||
161 | return_ACPI_STATUS(status); | 161 | return_ACPI_STATUS(status); |
@@ -165,8 +165,8 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, | |||
165 | 165 | ||
166 | if (!info.return_object) { | 166 | if (!info.return_object) { |
167 | if (expected_return_btypes) { | 167 | if (expected_return_btypes) { |
168 | ACPI_REPORT_MTERROR("No object was returned from", | 168 | ACPI_ERROR_METHOD("No object was returned from", |
169 | prefix_node, path, AE_NOT_EXIST); | 169 | prefix_node, path, AE_NOT_EXIST); |
170 | 170 | ||
171 | return_ACPI_STATUS(AE_NOT_EXIST); | 171 | return_ACPI_STATUS(AE_NOT_EXIST); |
172 | } | 172 | } |
@@ -211,10 +211,14 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, | |||
211 | /* Is the return object one of the expected types? */ | 211 | /* Is the return object one of the expected types? */ |
212 | 212 | ||
213 | if (!(expected_return_btypes & return_btype)) { | 213 | if (!(expected_return_btypes & return_btype)) { |
214 | ACPI_REPORT_MTERROR("Return object type is incorrect", | 214 | ACPI_ERROR_METHOD("Return object type is incorrect", |
215 | prefix_node, path, AE_TYPE); | 215 | prefix_node, path, AE_TYPE); |
216 | 216 | ||
217 | ACPI_REPORT_ERROR(("Type returned from %s was incorrect: %s, expected Btypes: %X\n", path, acpi_ut_get_object_type_name(info.return_object), expected_return_btypes)); | 217 | ACPI_ERROR((AE_INFO, |
218 | "Type returned from %s was incorrect: %s, expected Btypes: %X", | ||
219 | path, | ||
220 | acpi_ut_get_object_type_name(info.return_object), | ||
221 | expected_return_btypes)); | ||
218 | 222 | ||
219 | /* On error exit, we must delete the return object */ | 223 | /* On error exit, we must delete the return object */ |
220 | 224 | ||
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 87ca9a0a8b76..ffd13383a325 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -121,8 +121,8 @@ const char *acpi_format_exception(acpi_status status) | |||
121 | if (!exception) { | 121 | if (!exception) { |
122 | /* Exception code was not recognized */ | 122 | /* Exception code was not recognized */ |
123 | 123 | ||
124 | ACPI_REPORT_ERROR(("Unknown exception code: 0x%8.8X\n", | 124 | ACPI_ERROR((AE_INFO, |
125 | status)); | 125 | "Unknown exception code: 0x%8.8X", status)); |
126 | 126 | ||
127 | exception = "UNKNOWN_STATUS_CODE"; | 127 | exception = "UNKNOWN_STATUS_CODE"; |
128 | } | 128 | } |
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c index 7565ba6f90d5..ba771b4f39bc 100644 --- a/drivers/acpi/utilities/utinit.c +++ b/drivers/acpi/utilities/utinit.c | |||
@@ -72,9 +72,9 @@ static void | |||
72 | acpi_ut_fadt_register_error(char *register_name, u32 value, acpi_size offset) | 72 | acpi_ut_fadt_register_error(char *register_name, u32 value, acpi_size offset) |
73 | { | 73 | { |
74 | 74 | ||
75 | ACPI_REPORT_WARNING(("Invalid FADT value %s=%X at offset %X FADT=%p\n", | 75 | ACPI_WARNING((AE_INFO, |
76 | register_name, value, (u32) offset, | 76 | "Invalid FADT value %s=%X at offset %X FADT=%p", |
77 | acpi_gbl_FADT)); | 77 | register_name, value, (u32) offset, acpi_gbl_FADT)); |
78 | } | 78 | } |
79 | 79 | ||
80 | /****************************************************************************** | 80 | /****************************************************************************** |
@@ -221,7 +221,7 @@ void acpi_ut_subsystem_shutdown(void) | |||
221 | /* Just exit if subsystem is already shutdown */ | 221 | /* Just exit if subsystem is already shutdown */ |
222 | 222 | ||
223 | if (acpi_gbl_shutdown) { | 223 | if (acpi_gbl_shutdown) { |
224 | ACPI_REPORT_ERROR(("ACPI Subsystem is already terminated\n")); | 224 | ACPI_ERROR((AE_INFO, "ACPI Subsystem is already terminated")); |
225 | return_VOID; | 225 | return_VOID; |
226 | } | 226 | } |
227 | 227 | ||
diff --git a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c index 06214201329d..4a3360484e72 100644 --- a/drivers/acpi/utilities/utmath.c +++ b/drivers/acpi/utilities/utmath.c | |||
@@ -82,7 +82,7 @@ acpi_ut_short_divide(acpi_integer dividend, | |||
82 | /* Always check for a zero divisor */ | 82 | /* Always check for a zero divisor */ |
83 | 83 | ||
84 | if (divisor == 0) { | 84 | if (divisor == 0) { |
85 | ACPI_REPORT_ERROR(("Divide by zero\n")); | 85 | ACPI_ERROR((AE_INFO, "Divide by zero")); |
86 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); | 86 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); |
87 | } | 87 | } |
88 | 88 | ||
@@ -144,7 +144,7 @@ acpi_ut_divide(acpi_integer in_dividend, | |||
144 | /* Always check for a zero divisor */ | 144 | /* Always check for a zero divisor */ |
145 | 145 | ||
146 | if (in_divisor == 0) { | 146 | if (in_divisor == 0) { |
147 | ACPI_REPORT_ERROR(("Divide by zero\n")); | 147 | ACPI_ERROR((AE_INFO, "Divide by zero")); |
148 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); | 148 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); |
149 | } | 149 | } |
150 | 150 | ||
@@ -266,7 +266,7 @@ acpi_ut_short_divide(acpi_integer in_dividend, | |||
266 | /* Always check for a zero divisor */ | 266 | /* Always check for a zero divisor */ |
267 | 267 | ||
268 | if (divisor == 0) { | 268 | if (divisor == 0) { |
269 | ACPI_REPORT_ERROR(("Divide by zero\n")); | 269 | ACPI_ERROR((AE_INFO, "Divide by zero")); |
270 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); | 270 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); |
271 | } | 271 | } |
272 | 272 | ||
@@ -292,7 +292,7 @@ acpi_ut_divide(acpi_integer in_dividend, | |||
292 | /* Always check for a zero divisor */ | 292 | /* Always check for a zero divisor */ |
293 | 293 | ||
294 | if (in_divisor == 0) { | 294 | if (in_divisor == 0) { |
295 | ACPI_REPORT_ERROR(("Divide by zero\n")); | 295 | ACPI_ERROR((AE_INFO, "Divide by zero")); |
296 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); | 296 | return_ACPI_STATUS(AE_AML_DIVIDE_BY_ZERO); |
297 | } | 297 | } |
298 | 298 | ||
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index a77ffcd5570f..7364f5f8c9cd 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -72,8 +72,8 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
72 | /* Guard against multiple allocations of ID to the same location */ | 72 | /* Guard against multiple allocations of ID to the same location */ |
73 | 73 | ||
74 | if (*owner_id) { | 74 | if (*owner_id) { |
75 | ACPI_REPORT_ERROR(("Owner ID [%2.2X] already exists\n", | 75 | ACPI_ERROR((AE_INFO, "Owner ID [%2.2X] already exists", |
76 | *owner_id)); | 76 | *owner_id)); |
77 | return_ACPI_STATUS(AE_ALREADY_EXISTS); | 77 | return_ACPI_STATUS(AE_ALREADY_EXISTS); |
78 | } | 78 | } |
79 | 79 | ||
@@ -143,7 +143,8 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
143 | * methods, or there may be a bug where the IDs are not released. | 143 | * methods, or there may be a bug where the IDs are not released. |
144 | */ | 144 | */ |
145 | status = AE_OWNER_ID_LIMIT; | 145 | status = AE_OWNER_ID_LIMIT; |
146 | ACPI_REPORT_ERROR(("Could not allocate new owner_id (255 max), AE_OWNER_ID_LIMIT\n")); | 146 | ACPI_ERROR((AE_INFO, |
147 | "Could not allocate new owner_id (255 max), AE_OWNER_ID_LIMIT")); | ||
147 | 148 | ||
148 | exit: | 149 | exit: |
149 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); | 150 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); |
@@ -180,7 +181,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
180 | /* Zero is not a valid owner_iD */ | 181 | /* Zero is not a valid owner_iD */ |
181 | 182 | ||
182 | if (owner_id == 0) { | 183 | if (owner_id == 0) { |
183 | ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); | 184 | ACPI_ERROR((AE_INFO, "Invalid owner_id: %2.2X", owner_id)); |
184 | return_VOID; | 185 | return_VOID; |
185 | } | 186 | } |
186 | 187 | ||
@@ -205,8 +206,9 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
205 | if (acpi_gbl_owner_id_mask[index] & bit) { | 206 | if (acpi_gbl_owner_id_mask[index] & bit) { |
206 | acpi_gbl_owner_id_mask[index] ^= bit; | 207 | acpi_gbl_owner_id_mask[index] ^= bit; |
207 | } else { | 208 | } else { |
208 | ACPI_REPORT_ERROR(("Release of non-allocated owner_id: %2.2X\n", | 209 | ACPI_ERROR((AE_INFO, |
209 | owner_id + 1)); | 210 | "Release of non-allocated owner_id: %2.2X", |
211 | owner_id + 1)); | ||
210 | } | 212 | } |
211 | 213 | ||
212 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); | 214 | (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); |
@@ -837,55 +839,95 @@ u8 acpi_ut_generate_checksum(u8 * buffer, u32 length) | |||
837 | 839 | ||
838 | /******************************************************************************* | 840 | /******************************************************************************* |
839 | * | 841 | * |
840 | * FUNCTION: acpi_ut_report_error | 842 | * FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info |
841 | * | 843 | * |
842 | * PARAMETERS: module_name - Caller's module name (for error output) | 844 | * PARAMETERS: module_name - Caller's module name (for error output) |
843 | * line_number - Caller's line number (for error output) | 845 | * line_number - Caller's line number (for error output) |
846 | * Format - Printf format string + additional args | ||
844 | * | 847 | * |
845 | * RETURN: None | 848 | * RETURN: None |
846 | * | 849 | * |
847 | * DESCRIPTION: Print error message | 850 | * DESCRIPTION: Print message with module/line/version info |
848 | * | 851 | * |
849 | ******************************************************************************/ | 852 | ******************************************************************************/ |
850 | 853 | ||
851 | void acpi_ut_report_error(char *module_name, u32 line_number) | 854 | void ACPI_INTERNAL_VAR_XFACE |
855 | acpi_ut_error(char *module_name, u32 line_number, char *format, ...) | ||
852 | { | 856 | { |
857 | va_list args; | ||
853 | 858 | ||
854 | acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); | 859 | acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); |
860 | |||
861 | va_start(args, format); | ||
862 | acpi_os_vprintf(format, args); | ||
863 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | ||
855 | } | 864 | } |
856 | 865 | ||
857 | /******************************************************************************* | 866 | void ACPI_INTERNAL_VAR_XFACE |
858 | * | 867 | acpi_ut_exception(char *module_name, |
859 | * FUNCTION: acpi_ut_report_warning | 868 | u32 line_number, acpi_status status, char *format, ...) |
860 | * | 869 | { |
861 | * PARAMETERS: module_name - Caller's module name (for error output) | 870 | va_list args; |
862 | * line_number - Caller's line number (for error output) | ||
863 | * | ||
864 | * RETURN: None | ||
865 | * | ||
866 | * DESCRIPTION: Print warning message | ||
867 | * | ||
868 | ******************************************************************************/ | ||
869 | 871 | ||
870 | void acpi_ut_report_warning(char *module_name, u32 line_number) | 872 | acpi_os_printf("ACPI Exception (%s-%04d): %s, ", module_name, |
873 | line_number, acpi_format_exception(status)); | ||
874 | |||
875 | va_start(args, format); | ||
876 | acpi_os_vprintf(format, args); | ||
877 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | ||
878 | } | ||
879 | |||
880 | void ACPI_INTERNAL_VAR_XFACE | ||
881 | acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) | ||
871 | { | 882 | { |
883 | va_list args; | ||
872 | 884 | ||
873 | acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number); | 885 | acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number); |
886 | |||
887 | va_start(args, format); | ||
888 | acpi_os_vprintf(format, args); | ||
889 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | ||
890 | } | ||
891 | |||
892 | void ACPI_INTERNAL_VAR_XFACE | ||
893 | acpi_ut_info(char *module_name, u32 line_number, char *format, ...) | ||
894 | { | ||
895 | va_list args; | ||
896 | |||
897 | acpi_os_printf("ACPI (%s-%04d): ", module_name, line_number); | ||
898 | |||
899 | va_start(args, format); | ||
900 | acpi_os_vprintf(format, args); | ||
901 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | ||
874 | } | 902 | } |
875 | 903 | ||
876 | /******************************************************************************* | 904 | /******************************************************************************* |
877 | * | 905 | * |
878 | * FUNCTION: acpi_ut_report_info | 906 | * FUNCTION: acpi_ut_report_error, Warning, Info |
879 | * | 907 | * |
880 | * PARAMETERS: module_name - Caller's module name (for error output) | 908 | * PARAMETERS: module_name - Caller's module name (for error output) |
881 | * line_number - Caller's line number (for error output) | 909 | * line_number - Caller's line number (for error output) |
882 | * | 910 | * |
883 | * RETURN: None | 911 | * RETURN: None |
884 | * | 912 | * |
885 | * DESCRIPTION: Print information message | 913 | * DESCRIPTION: Print error message |
914 | * | ||
915 | * Note: Legacy only, should be removed when no longer used by drivers. | ||
886 | * | 916 | * |
887 | ******************************************************************************/ | 917 | ******************************************************************************/ |
888 | 918 | ||
919 | void acpi_ut_report_error(char *module_name, u32 line_number) | ||
920 | { | ||
921 | |||
922 | acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); | ||
923 | } | ||
924 | |||
925 | void acpi_ut_report_warning(char *module_name, u32 line_number) | ||
926 | { | ||
927 | |||
928 | acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number); | ||
929 | } | ||
930 | |||
889 | void acpi_ut_report_info(char *module_name, u32 line_number) | 931 | void acpi_ut_report_info(char *module_name, u32 line_number) |
890 | { | 932 | { |
891 | 933 | ||
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c index ffaff55270b1..45a7244df924 100644 --- a/drivers/acpi/utilities/utmutex.c +++ b/drivers/acpi/utilities/utmutex.c | |||
@@ -216,12 +216,20 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | |||
216 | for (i = mutex_id; i < MAX_MUTEX; i++) { | 216 | for (i = mutex_id; i < MAX_MUTEX; i++) { |
217 | if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { | 217 | if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { |
218 | if (i == mutex_id) { | 218 | if (i == mutex_id) { |
219 | ACPI_REPORT_ERROR(("Mutex [%s] already acquired by this thread [%X]\n", acpi_ut_get_mutex_name(mutex_id), this_thread_id)); | 219 | ACPI_ERROR((AE_INFO, |
220 | "Mutex [%s] already acquired by this thread [%X]", | ||
221 | acpi_ut_get_mutex_name | ||
222 | (mutex_id), | ||
223 | this_thread_id)); | ||
220 | 224 | ||
221 | return (AE_ALREADY_ACQUIRED); | 225 | return (AE_ALREADY_ACQUIRED); |
222 | } | 226 | } |
223 | 227 | ||
224 | ACPI_REPORT_ERROR(("Invalid acquire order: Thread %X owns [%s], wants [%s]\n", this_thread_id, acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id))); | 228 | ACPI_ERROR((AE_INFO, |
229 | "Invalid acquire order: Thread %X owns [%s], wants [%s]", | ||
230 | this_thread_id, | ||
231 | acpi_ut_get_mutex_name(i), | ||
232 | acpi_ut_get_mutex_name(mutex_id))); | ||
225 | 233 | ||
226 | return (AE_ACQUIRE_DEADLOCK); | 234 | return (AE_ACQUIRE_DEADLOCK); |
227 | } | 235 | } |
@@ -244,7 +252,9 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | |||
244 | acpi_gbl_mutex_info[mutex_id].use_count++; | 252 | acpi_gbl_mutex_info[mutex_id].use_count++; |
245 | acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; | 253 | acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; |
246 | } else { | 254 | } else { |
247 | ACPI_REPORT_ERROR(("Thread %X could not acquire Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status))); | 255 | ACPI_EXCEPTION((AE_INFO, status, |
256 | "Thread %X could not acquire Mutex [%X]", | ||
257 | this_thread_id, mutex_id)); | ||
248 | } | 258 | } |
249 | 259 | ||
250 | return (status); | 260 | return (status); |
@@ -282,7 +292,9 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | |||
282 | * Mutex must be acquired in order to release it! | 292 | * Mutex must be acquired in order to release it! |
283 | */ | 293 | */ |
284 | if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { | 294 | if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { |
285 | ACPI_REPORT_ERROR(("Mutex [%X] is not acquired, cannot release\n", mutex_id)); | 295 | ACPI_ERROR((AE_INFO, |
296 | "Mutex [%X] is not acquired, cannot release", | ||
297 | mutex_id)); | ||
286 | 298 | ||
287 | return (AE_NOT_ACQUIRED); | 299 | return (AE_NOT_ACQUIRED); |
288 | } | 300 | } |
@@ -303,7 +315,10 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | |||
303 | continue; | 315 | continue; |
304 | } | 316 | } |
305 | 317 | ||
306 | ACPI_REPORT_ERROR(("Invalid release order: owns [%s], releasing [%s]\n", acpi_ut_get_mutex_name(i), acpi_ut_get_mutex_name(mutex_id))); | 318 | ACPI_ERROR((AE_INFO, |
319 | "Invalid release order: owns [%s], releasing [%s]", | ||
320 | acpi_ut_get_mutex_name(i), | ||
321 | acpi_ut_get_mutex_name(mutex_id))); | ||
307 | 322 | ||
308 | return (AE_RELEASE_DEADLOCK); | 323 | return (AE_RELEASE_DEADLOCK); |
309 | } | 324 | } |
@@ -319,7 +334,9 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | |||
319 | acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); | 334 | acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); |
320 | 335 | ||
321 | if (ACPI_FAILURE(status)) { | 336 | if (ACPI_FAILURE(status)) { |
322 | ACPI_REPORT_ERROR(("Thread %X could not release Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status))); | 337 | ACPI_EXCEPTION((AE_INFO, status, |
338 | "Thread %X could not release Mutex [%X]", | ||
339 | this_thread_id, mutex_id)); | ||
323 | } else { | 340 | } else { |
324 | ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, | 341 | ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, |
325 | "Thread %X released Mutex [%s]\n", | 342 | "Thread %X released Mutex [%s]\n", |
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 1b6b21577805..7ee2d1d98071 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -177,8 +177,8 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size) | |||
177 | 177 | ||
178 | buffer = ACPI_MEM_CALLOCATE(buffer_size); | 178 | buffer = ACPI_MEM_CALLOCATE(buffer_size); |
179 | if (!buffer) { | 179 | if (!buffer) { |
180 | ACPI_REPORT_ERROR(("Could not allocate size %X\n", | 180 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", |
181 | (u32) buffer_size)); | 181 | (u32) buffer_size)); |
182 | acpi_ut_remove_reference(buffer_desc); | 182 | acpi_ut_remove_reference(buffer_desc); |
183 | return_PTR(NULL); | 183 | return_PTR(NULL); |
184 | } | 184 | } |
@@ -229,8 +229,8 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) | |||
229 | */ | 229 | */ |
230 | string = ACPI_MEM_CALLOCATE(string_size + 1); | 230 | string = ACPI_MEM_CALLOCATE(string_size + 1); |
231 | if (!string) { | 231 | if (!string) { |
232 | ACPI_REPORT_ERROR(("Could not allocate size %X\n", | 232 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", |
233 | (u32) string_size)); | 233 | (u32) string_size)); |
234 | acpi_ut_remove_reference(string_desc); | 234 | acpi_ut_remove_reference(string_desc); |
235 | return_PTR(NULL); | 235 | return_PTR(NULL); |
236 | } | 236 | } |
@@ -312,8 +312,8 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, | |||
312 | 312 | ||
313 | object = acpi_os_acquire_object(acpi_gbl_operand_cache); | 313 | object = acpi_os_acquire_object(acpi_gbl_operand_cache); |
314 | if (!object) { | 314 | if (!object) { |
315 | _ACPI_REPORT_ERROR(module_name, line_number, | 315 | ACPI_ERROR((module_name, line_number, |
316 | ("Could not allocate an object descriptor\n")); | 316 | "Could not allocate an object descriptor")); |
317 | 317 | ||
318 | return_PTR(NULL); | 318 | return_PTR(NULL); |
319 | } | 319 | } |
@@ -347,9 +347,9 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object) | |||
347 | /* Object must be an union acpi_operand_object */ | 347 | /* Object must be an union acpi_operand_object */ |
348 | 348 | ||
349 | if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { | 349 | if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { |
350 | ACPI_REPORT_ERROR(("%p is not an ACPI Operand object [%s]\n", | 350 | ACPI_ERROR((AE_INFO, |
351 | object, | 351 | "%p is not an ACPI Operand object [%s]", object, |
352 | acpi_ut_get_descriptor_name(object))); | 352 | acpi_ut_get_descriptor_name(object))); |
353 | return_VOID; | 353 | return_VOID; |
354 | } | 354 | } |
355 | 355 | ||
@@ -451,7 +451,10 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, | |||
451 | * Notably, Locals and Args are not supported, but this may be | 451 | * Notably, Locals and Args are not supported, but this may be |
452 | * required eventually. | 452 | * required eventually. |
453 | */ | 453 | */ |
454 | ACPI_REPORT_ERROR(("Unsupported Reference opcode=%X in object %p\n", internal_object->reference.opcode, internal_object)); | 454 | ACPI_ERROR((AE_INFO, |
455 | "Unsupported Reference opcode=%X in object %p", | ||
456 | internal_object->reference.opcode, | ||
457 | internal_object)); | ||
455 | status = AE_TYPE; | 458 | status = AE_TYPE; |
456 | break; | 459 | break; |
457 | } | 460 | } |
@@ -459,9 +462,9 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, | |||
459 | 462 | ||
460 | default: | 463 | default: |
461 | 464 | ||
462 | ACPI_REPORT_ERROR(("Unsupported type=%X in object %p\n", | 465 | ACPI_ERROR((AE_INFO, "Unsupported type=%X in object %p", |
463 | ACPI_GET_OBJECT_TYPE(internal_object), | 466 | ACPI_GET_OBJECT_TYPE(internal_object), |
464 | internal_object)); | 467 | internal_object)); |
465 | status = AE_TYPE; | 468 | status = AE_TYPE; |
466 | break; | 469 | break; |
467 | } | 470 | } |
diff --git a/drivers/acpi/utilities/utresrc.c b/drivers/acpi/utilities/utresrc.c index 36bf9e4bf529..16461317113f 100644 --- a/drivers/acpi/utilities/utresrc.c +++ b/drivers/acpi/utilities/utresrc.c | |||
@@ -486,6 +486,7 @@ u32 acpi_ut_get_descriptor_length(void *aml) | |||
486 | * RETURN: Status, pointer to the end tag | 486 | * RETURN: Status, pointer to the end tag |
487 | * | 487 | * |
488 | * DESCRIPTION: Find the end_tag resource descriptor in an AML resource template | 488 | * DESCRIPTION: Find the end_tag resource descriptor in an AML resource template |
489 | * Note: allows a buffer length of zero. | ||
489 | * | 490 | * |
490 | ******************************************************************************/ | 491 | ******************************************************************************/ |
491 | 492 | ||
@@ -504,6 +505,13 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc, | |||
504 | aml = obj_desc->buffer.pointer; | 505 | aml = obj_desc->buffer.pointer; |
505 | end_aml = aml + obj_desc->buffer.length; | 506 | end_aml = aml + obj_desc->buffer.length; |
506 | 507 | ||
508 | /* Allow a buffer length of zero */ | ||
509 | |||
510 | if (!obj_desc->buffer.length) { | ||
511 | *end_tag = aml; | ||
512 | return_ACPI_STATUS(AE_OK); | ||
513 | } | ||
514 | |||
507 | /* Walk the resource template, one descriptor per iteration */ | 515 | /* Walk the resource template, one descriptor per iteration */ |
508 | 516 | ||
509 | while (aml < end_aml) { | 517 | while (aml < end_aml) { |
@@ -518,6 +526,14 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc, | |||
518 | 526 | ||
519 | if (acpi_ut_get_resource_type(aml) == | 527 | if (acpi_ut_get_resource_type(aml) == |
520 | ACPI_RESOURCE_NAME_END_TAG) { | 528 | ACPI_RESOURCE_NAME_END_TAG) { |
529 | /* | ||
530 | * There must be at least one more byte in the buffer for | ||
531 | * the 2nd byte of the end_tag | ||
532 | */ | ||
533 | if ((aml + 1) >= end_aml) { | ||
534 | return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); | ||
535 | } | ||
536 | |||
521 | /* Return the pointer to the end_tag */ | 537 | /* Return the pointer to the end_tag */ |
522 | 538 | ||
523 | *end_tag = aml; | 539 | *end_tag = aml; |
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index b4bc94883200..308a960871be 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c | |||
@@ -75,8 +75,7 @@ acpi_status acpi_initialize_subsystem(void) | |||
75 | 75 | ||
76 | status = acpi_os_initialize(); | 76 | status = acpi_os_initialize(); |
77 | if (ACPI_FAILURE(status)) { | 77 | if (ACPI_FAILURE(status)) { |
78 | ACPI_REPORT_ERROR(("OSL failed to initialize, %s\n", | 78 | ACPI_EXCEPTION((AE_INFO, status, "During OSL initialization")); |
79 | acpi_format_exception(status))); | ||
80 | return_ACPI_STATUS(status); | 79 | return_ACPI_STATUS(status); |
81 | } | 80 | } |
82 | 81 | ||
@@ -88,8 +87,8 @@ acpi_status acpi_initialize_subsystem(void) | |||
88 | 87 | ||
89 | status = acpi_ut_mutex_initialize(); | 88 | status = acpi_ut_mutex_initialize(); |
90 | if (ACPI_FAILURE(status)) { | 89 | if (ACPI_FAILURE(status)) { |
91 | ACPI_REPORT_ERROR(("Global mutex creation failure, %s\n", | 90 | ACPI_EXCEPTION((AE_INFO, status, |
92 | acpi_format_exception(status))); | 91 | "During Global Mutex creation")); |
93 | return_ACPI_STATUS(status); | 92 | return_ACPI_STATUS(status); |
94 | } | 93 | } |
95 | 94 | ||
@@ -99,15 +98,14 @@ acpi_status acpi_initialize_subsystem(void) | |||
99 | */ | 98 | */ |
100 | status = acpi_ns_root_initialize(); | 99 | status = acpi_ns_root_initialize(); |
101 | if (ACPI_FAILURE(status)) { | 100 | if (ACPI_FAILURE(status)) { |
102 | ACPI_REPORT_ERROR(("Namespace initialization failure, %s\n", | 101 | ACPI_EXCEPTION((AE_INFO, status, |
103 | acpi_format_exception(status))); | 102 | "During Namespace initialization")); |
104 | return_ACPI_STATUS(status); | 103 | return_ACPI_STATUS(status); |
105 | } | 104 | } |
106 | 105 | ||
107 | /* If configured, initialize the AML debugger */ | 106 | /* If configured, initialize the AML debugger */ |
108 | 107 | ||
109 | ACPI_DEBUGGER_EXEC(status = acpi_db_initialize()); | 108 | ACPI_DEBUGGER_EXEC(status = acpi_db_initialize()); |
110 | |||
111 | return_ACPI_STATUS(status); | 109 | return_ACPI_STATUS(status); |
112 | } | 110 | } |
113 | 111 | ||
@@ -154,7 +152,7 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
154 | 152 | ||
155 | status = acpi_enable(); | 153 | status = acpi_enable(); |
156 | if (ACPI_FAILURE(status)) { | 154 | if (ACPI_FAILURE(status)) { |
157 | ACPI_REPORT_WARNING(("acpi_enable failed\n")); | 155 | ACPI_WARNING((AE_INFO, "acpi_enable failed")); |
158 | return_ACPI_STATUS(status); | 156 | return_ACPI_STATUS(status); |
159 | } | 157 | } |
160 | } | 158 | } |
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 675a32f78329..e27dc8f29972 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20060113 | 66 | #define ACPI_CA_VERSION 0x20060127 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
@@ -83,7 +83,7 @@ | |||
83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | 83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Should the subystem abort the loading of an ACPI table if the | 86 | * Should the subsystem abort the loading of an ACPI table if the |
87 | * table checksum is incorrect? | 87 | * table checksum is incorrect? |
88 | */ | 88 | */ |
89 | #define ACPI_CHECKSUM_ABORT FALSE | 89 | #define ACPI_CHECKSUM_ABORT FALSE |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 97f8e4185e4f..8361820d2970 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -416,13 +416,13 @@ struct acpi_field_info { | |||
416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 | 416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 |
417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 | 417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 |
418 | 418 | ||
419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ | 419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ |
420 | u8 data_type; /* To differentiate various internal objs */\ | 420 | u8 data_type; /* To differentiate various internal objs */\ |
421 | u8 flags; \ | 421 | u8 flags; \ |
422 | u16 value; \ | 422 | u16 value; \ |
423 | u16 state; \ | 423 | u16 state; \ |
424 | u16 reserved; \ | 424 | u16 reserved; \ |
425 | void *next; \ | 425 | void *next; |
426 | 426 | ||
427 | struct acpi_common_state { | 427 | struct acpi_common_state { |
428 | ACPI_STATE_COMMON}; | 428 | ACPI_STATE_COMMON}; |
@@ -575,8 +575,7 @@ union acpi_parse_value { | |||
575 | char aml_op_name[16]) /* Op name (debug only) */\ | 575 | char aml_op_name[16]) /* Op name (debug only) */\ |
576 | /* NON-DEBUG members below: */\ | 576 | /* NON-DEBUG members below: */\ |
577 | struct acpi_namespace_node *node; /* For use by interpreter */\ | 577 | struct acpi_namespace_node *node; /* For use by interpreter */\ |
578 | union acpi_parse_value value; /* Value or args associated with the opcode */\ | 578 | union acpi_parse_value value; /* Value or args associated with the opcode */ |
579 | |||
580 | 579 | ||
581 | #define ACPI_DASM_BUFFER 0x00 | 580 | #define ACPI_DASM_BUFFER 0x00 |
582 | #define ACPI_DASM_RESOURCE 0x01 | 581 | #define ACPI_DASM_RESOURCE 0x01 |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 49ba151766de..f2be2a881730 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -341,8 +341,12 @@ | |||
341 | /* | 341 | /* |
342 | * Rounding macros (Power of two boundaries only) | 342 | * Rounding macros (Power of two boundaries only) |
343 | */ | 343 | */ |
344 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & (~(((acpi_native_uint) boundary)-1))) | 344 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ |
345 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + (((acpi_native_uint) boundary)-1)) & (~(((acpi_native_uint) boundary)-1))) | 345 | (~(((acpi_native_uint) boundary)-1))) |
346 | |||
347 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ | ||
348 | (((acpi_native_uint) boundary)-1)) & \ | ||
349 | (~(((acpi_native_uint) boundary)-1))) | ||
346 | 350 | ||
347 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) | 351 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) |
348 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) | 352 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) |
@@ -379,10 +383,11 @@ | |||
379 | 383 | ||
380 | /* Generate a UUID */ | 384 | /* Generate a UUID */ |
381 | 385 | ||
382 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \ | 386 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ |
383 | (b) & 0xFF, ((b) >> 8) & 0xFF, \ | 387 | (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \ |
384 | (c) & 0xFF, ((c) >> 8) & 0xFF, \ | 388 | (b) & 0xFF, ((b) >> 8) & 0xFF, \ |
385 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) | 389 | (c) & 0xFF, ((c) >> 8) & 0xFF, \ |
390 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) | ||
386 | 391 | ||
387 | /* | 392 | /* |
388 | * An struct acpi_namespace_node * can appear in some contexts, | 393 | * An struct acpi_namespace_node * can appear in some contexts, |
@@ -442,13 +447,12 @@ | |||
442 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) | 447 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) |
443 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) | 448 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) |
444 | 449 | ||
450 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | ||
445 | /* | 451 | /* |
446 | * Module name is include in both debug and non-debug versions primarily for | 452 | * Module name is include in both debug and non-debug versions primarily for |
447 | * error messages. The __FILE__ macro is not very useful for this, because it | 453 | * error messages. The __FILE__ macro is not very useful for this, because it |
448 | * often includes the entire pathname to the module | 454 | * often includes the entire pathname to the module |
449 | */ | 455 | */ |
450 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | ||
451 | |||
452 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; | 456 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; |
453 | #else | 457 | #else |
454 | #define ACPI_MODULE_NAME(name) | 458 | #define ACPI_MODULE_NAME(name) |
@@ -458,45 +462,31 @@ | |||
458 | * Ascii error messages can be configured out | 462 | * Ascii error messages can be configured out |
459 | */ | 463 | */ |
460 | #ifndef ACPI_NO_ERROR_MESSAGES | 464 | #ifndef ACPI_NO_ERROR_MESSAGES |
461 | 465 | #define AE_INFO _acpi_module_name, __LINE__ | |
462 | #define ACPI_PARAM_LIST(pl) pl | ||
463 | #define ACPI_LOCATION_INFO _acpi_module_name, __LINE__ | ||
464 | 466 | ||
465 | /* | 467 | /* |
466 | * Error reporting. Callers module and line number are inserted automatically | 468 | * Error reporting. Callers module and line number are inserted by AE_INFO, |
467 | * These macros are used for both the debug and non-debug versions of the code | 469 | * the plist contains a set of parens to allow variable-length lists. |
470 | * These macros are used for both the debug and non-debug versions of the code. | ||
468 | */ | 471 | */ |
469 | #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info (ACPI_LOCATION_INFO); \ | 472 | #define ACPI_INFO(plist) acpi_ut_info plist |
470 | acpi_os_printf ACPI_PARAM_LIST (fp);} | 473 | #define ACPI_WARNING(plist) acpi_ut_warning plist |
471 | #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error (ACPI_LOCATION_INFO); \ | 474 | #define ACPI_EXCEPTION(plist) acpi_ut_exception plist |
472 | acpi_os_printf ACPI_PARAM_LIST (fp);} | 475 | #define ACPI_ERROR(plist) acpi_ut_error plist |
473 | #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning (ACPI_LOCATION_INFO); \ | 476 | #define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e); |
474 | acpi_os_printf ACPI_PARAM_LIST (fp);} | 477 | #define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e); |
475 | #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error (ACPI_LOCATION_INFO, \ | ||
476 | s, e); | ||
477 | #define ACPI_REPORT_MTERROR(s,n,p,e) acpi_ns_report_method_error (ACPI_LOCATION_INFO, \ | ||
478 | s, n, p, e); | ||
479 | |||
480 | /* Error reporting. These versions pass thru the module and lineno */ | ||
481 | 478 | ||
482 | #define _ACPI_REPORT_INFO(a,b,fp) {acpi_ut_report_info (a,b); \ | ||
483 | acpi_os_printf ACPI_PARAM_LIST (fp);} | ||
484 | #define _ACPI_REPORT_ERROR(a,b,fp) {acpi_ut_report_error (a,b); \ | ||
485 | acpi_os_printf ACPI_PARAM_LIST (fp);} | ||
486 | #define _ACPI_REPORT_WARNING(a,b,fp) {acpi_ut_report_warning (a,b); \ | ||
487 | acpi_os_printf ACPI_PARAM_LIST (fp);} | ||
488 | #else | 479 | #else |
489 | 480 | ||
490 | /* No error messages */ | 481 | /* No error messages */ |
491 | 482 | ||
492 | #define ACPI_REPORT_INFO(fp) | 483 | #define ACPI_INFO(plist) |
493 | #define ACPI_REPORT_ERROR(fp) | 484 | #define ACPI_WARNING(plist) |
494 | #define ACPI_REPORT_WARNING(fp) | 485 | #define ACPI_EXCEPTION(plist) |
495 | #define ACPI_REPORT_NSERROR(s,e) | 486 | #define ACPI_ERROR(plist) |
496 | #define ACPI_REPORT_MTERROR(s,n,p,e) | 487 | #define ACPI_ERROR_NAMESPACE(s,e) |
497 | #define _ACPI_REPORT_INFO(a,b,c,fp) | 488 | #define ACPI_ERROR_METHOD(s,n,p,e) |
498 | #define _ACPI_REPORT_ERROR(a,b,c,fp) | 489 | |
499 | #define _ACPI_REPORT_WARNING(a,b,c,fp) | ||
500 | #endif | 490 | #endif |
501 | 491 | ||
502 | /* | 492 | /* |
@@ -538,7 +528,7 @@ | |||
538 | #endif | 528 | #endif |
539 | 529 | ||
540 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ | 530 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ |
541 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) | 531 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) |
542 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ | 532 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ |
543 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) | 533 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) |
544 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ | 534 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ |
@@ -632,18 +622,6 @@ | |||
632 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) | 622 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) |
633 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) | 623 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) |
634 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) | 624 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) |
635 | #define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a)) | ||
636 | |||
637 | /* | ||
638 | * Generate INT3 on ACPI_ERROR (Debug only!) | ||
639 | */ | ||
640 | #define ACPI_ERROR_BREAK | ||
641 | #ifdef ACPI_ERROR_BREAK | ||
642 | #define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \ | ||
643 | acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,"Fatal error encountered\n") | ||
644 | #else | ||
645 | #define ACPI_BREAK_ON_ERROR(lvl) | ||
646 | #endif | ||
647 | 625 | ||
648 | /* | 626 | /* |
649 | * Master debug print macros | 627 | * Master debug print macros |
@@ -651,8 +629,8 @@ | |||
651 | * 1) Debug print for the current component is enabled | 629 | * 1) Debug print for the current component is enabled |
652 | * 2) Debug error level or trace level for the print statement is enabled | 630 | * 2) Debug error level or trace level for the print statement is enabled |
653 | */ | 631 | */ |
654 | #define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl) | 632 | #define ACPI_DEBUG_PRINT(plist) acpi_ut_debug_print plist |
655 | #define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl) | 633 | #define ACPI_DEBUG_PRINT_RAW(plist) acpi_ut_debug_print_raw plist |
656 | 634 | ||
657 | #else | 635 | #else |
658 | /* | 636 | /* |
@@ -681,7 +659,6 @@ | |||
681 | #define ACPI_DUMP_BUFFER(a,b) | 659 | #define ACPI_DUMP_BUFFER(a,b) |
682 | #define ACPI_DEBUG_PRINT(pl) | 660 | #define ACPI_DEBUG_PRINT(pl) |
683 | #define ACPI_DEBUG_PRINT_RAW(pl) | 661 | #define ACPI_DEBUG_PRINT_RAW(pl) |
684 | #define ACPI_BREAK_MSG(a) | ||
685 | 662 | ||
686 | #define return_VOID return | 663 | #define return_VOID return |
687 | #define return_ACPI_STATUS(s) return(s) | 664 | #define return_ACPI_STATUS(s) return(s) |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 1bd411962c77..d130cfed8d55 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -69,7 +69,7 @@ | |||
69 | u8 type; /* acpi_object_type */\ | 69 | u8 type; /* acpi_object_type */\ |
70 | u16 reference_count; /* For object deletion management */\ | 70 | u16 reference_count; /* For object deletion management */\ |
71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ | 71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ |
72 | u8 flags; \ | 72 | u8 flags; |
73 | 73 | ||
74 | /* Values for flag byte above */ | 74 | /* Values for flag byte above */ |
75 | 75 | ||
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 768f63f391cd..970e9a6372c3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -108,9 +108,9 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle); | |||
108 | 108 | ||
109 | void acpi_os_delete_lock(acpi_handle handle); | 109 | void acpi_os_delete_lock(acpi_handle handle); |
110 | 110 | ||
111 | acpi_native_uint acpi_os_acquire_lock(acpi_handle handle); | 111 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); |
112 | 112 | ||
113 | void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags); | 113 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Memory allocation and mapping | 116 | * Memory allocation and mapping |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 74819e9b4699..7ca89cde706e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -237,17 +237,22 @@ typedef char *acpi_physical_address; | |||
237 | #error unknown ACPI_MACHINE_WIDTH | 237 | #error unknown ACPI_MACHINE_WIDTH |
238 | #endif | 238 | #endif |
239 | 239 | ||
240 | /* Variable-width type, used instead of clib size_t */ | ||
241 | |||
242 | typedef acpi_native_uint acpi_size; | ||
243 | |||
240 | /******************************************************************************* | 244 | /******************************************************************************* |
241 | * | 245 | * |
242 | * OS- or compiler-dependent types | 246 | * OS- or compiler-dependent types |
243 | * | 247 | * |
248 | * If the defaults below are not appropriate for the host system, they can | ||
249 | * be defined in the compiler-specific or OS-specific header, and this will | ||
250 | * take precedence. | ||
251 | * | ||
244 | ******************************************************************************/ | 252 | ******************************************************************************/ |
245 | 253 | ||
246 | /* | 254 | /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ |
247 | * If acpi_uintptr_t was not defined in the OS- or compiler-dependent header, | 255 | |
248 | * define it now (use C99 uintptr_t for pointer casting if available, | ||
249 | * "void *" otherwise) | ||
250 | */ | ||
251 | #ifndef acpi_uintptr_t | 256 | #ifndef acpi_uintptr_t |
252 | #define acpi_uintptr_t void * | 257 | #define acpi_uintptr_t void * |
253 | #endif | 258 | #endif |
@@ -261,9 +266,31 @@ typedef char *acpi_physical_address; | |||
261 | #define acpi_cache_t struct acpi_memory_list | 266 | #define acpi_cache_t struct acpi_memory_list |
262 | #endif | 267 | #endif |
263 | 268 | ||
264 | /* Variable-width type, used instead of clib size_t */ | 269 | /* |
270 | * Allow the CPU flags word to be defined per-OS to simplify the use of the | ||
271 | * lock and unlock OSL interfaces. | ||
272 | */ | ||
273 | #ifndef acpi_cpu_flags | ||
274 | #define acpi_cpu_flags acpi_native_uint | ||
275 | #endif | ||
265 | 276 | ||
266 | typedef acpi_native_uint acpi_size; | 277 | /* |
278 | * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because | ||
279 | * some compilers can catch printf format string problems | ||
280 | */ | ||
281 | #ifndef ACPI_PRINTF_LIKE | ||
282 | #define ACPI_PRINTF_LIKE(c) | ||
283 | #endif | ||
284 | |||
285 | /* | ||
286 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
287 | * use all the variables (for example, _acpi_module_name). This allows us | ||
288 | * to to tell the compiler in a per-variable manner that a variable | ||
289 | * is unused | ||
290 | */ | ||
291 | #ifndef ACPI_UNUSED_VAR | ||
292 | #define ACPI_UNUSED_VAR | ||
293 | #endif | ||
267 | 294 | ||
268 | /******************************************************************************* | 295 | /******************************************************************************* |
269 | * | 296 | * |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 10f6625f6390..0927765df6aa 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -275,20 +275,22 @@ acpi_ut_ptr_exit(u32 line_number, | |||
275 | const char *function_name, | 275 | const char *function_name, |
276 | char *module_name, u32 component_id, u8 * ptr); | 276 | char *module_name, u32 component_id, u8 * ptr); |
277 | 277 | ||
278 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | ||
279 | |||
278 | void acpi_ut_report_error(char *module_name, u32 line_number); | 280 | void acpi_ut_report_error(char *module_name, u32 line_number); |
279 | 281 | ||
280 | void acpi_ut_report_info(char *module_name, u32 line_number); | 282 | void acpi_ut_report_info(char *module_name, u32 line_number); |
281 | 283 | ||
282 | void acpi_ut_report_warning(char *module_name, u32 line_number); | 284 | void acpi_ut_report_warning(char *module_name, u32 line_number); |
283 | 285 | ||
284 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 286 | /* Error and message reporting interfaces */ |
285 | 287 | ||
286 | void ACPI_INTERNAL_VAR_XFACE | 288 | void ACPI_INTERNAL_VAR_XFACE |
287 | acpi_ut_debug_print(u32 requested_debug_level, | 289 | acpi_ut_debug_print(u32 requested_debug_level, |
288 | u32 line_number, | 290 | u32 line_number, |
289 | const char *function_name, | 291 | const char *function_name, |
290 | char *module_name, | 292 | char *module_name, |
291 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 293 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); |
292 | 294 | ||
293 | void ACPI_INTERNAL_VAR_XFACE | 295 | void ACPI_INTERNAL_VAR_XFACE |
294 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 296 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
@@ -296,7 +298,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
296 | const char *function_name, | 298 | const char *function_name, |
297 | char *module_name, | 299 | char *module_name, |
298 | u32 component_id, | 300 | u32 component_id, |
299 | char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 301 | char *format, ...) ACPI_PRINTF_LIKE(6); |
302 | |||
303 | void ACPI_INTERNAL_VAR_XFACE | ||
304 | acpi_ut_error(char *module_name, | ||
305 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
306 | |||
307 | void ACPI_INTERNAL_VAR_XFACE | ||
308 | acpi_ut_exception(char *module_name, | ||
309 | u32 line_number, | ||
310 | acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); | ||
311 | |||
312 | void ACPI_INTERNAL_VAR_XFACE | ||
313 | acpi_ut_warning(char *module_name, | ||
314 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
315 | |||
316 | void ACPI_INTERNAL_VAR_XFACE | ||
317 | acpi_ut_info(char *module_name, | ||
318 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
300 | 319 | ||
301 | /* | 320 | /* |
302 | * utdelete - Object deletion and reference counts | 321 | * utdelete - Object deletion and reference counts |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 31b0f18342f6..223ec6467108 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -149,6 +149,9 @@ | |||
149 | #elif defined(NETWARE) | 149 | #elif defined(NETWARE) |
150 | #include "acnetware.h" | 150 | #include "acnetware.h" |
151 | 151 | ||
152 | #elif defined(__sun) | ||
153 | #include "acsolaris.h" | ||
154 | |||
152 | #else | 155 | #else |
153 | 156 | ||
154 | /* All other environments */ | 157 | /* All other environments */ |
@@ -158,13 +161,6 @@ | |||
158 | #define COMPILER_DEPENDENT_INT64 long long | 161 | #define COMPILER_DEPENDENT_INT64 long long |
159 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 162 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
160 | 163 | ||
161 | /* | ||
162 | * This macro is used to tag functions as "printf-like" because | ||
163 | * some compilers can catch printf format string problems. MSVC | ||
164 | * doesn't, so this is proprocessed away. | ||
165 | */ | ||
166 | #define ACPI_PRINTF_LIKE_FUNC | ||
167 | |||
168 | #endif | 164 | #endif |
169 | 165 | ||
170 | /* | 166 | /* |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index ea2a6322f64d..da80933963db 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -48,12 +48,14 @@ | |||
48 | 48 | ||
49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ | 49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ |
50 | 50 | ||
51 | /* This macro is used to tag functions as "printf-like" because | 51 | /* |
52 | * This macro is used to tag functions as "printf-like" because | ||
52 | * some compilers (like GCC) can catch printf format string problems. | 53 | * some compilers (like GCC) can catch printf format string problems. |
53 | */ | 54 | */ |
54 | #define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 6, 7))) | 55 | #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1))) |
55 | 56 | ||
56 | /* Some compilers complain about unused variables. Sometimes we don't want to | 57 | /* |
58 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
57 | * use all the variables (for example, _acpi_module_name). This allows us | 59 | * use all the variables (for example, _acpi_module_name). This allows us |
58 | * to to tell the compiler warning in a per-variable manner that a variable | 60 | * to to tell the compiler warning in a per-variable manner that a variable |
59 | * is unused. | 61 | * is unused. |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index c21c27fe7e1e..2e6d54569ee8 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -102,4 +102,6 @@ | |||
102 | 102 | ||
103 | #include "acgcc.h" | 103 | #include "acgcc.h" |
104 | 104 | ||
105 | #define acpi_cpu_flags unsigned long | ||
106 | |||
105 | #endif /* __ACLINUX_H__ */ | 107 | #endif /* __ACLINUX_H__ */ |