aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-13 16:22:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-20 02:23:50 -0500
commit4a90c7e86202f46fa9af011bdbcdf36e355d1721 (patch)
tree3784cffb2166330d6f94ea53996fbeef36f58ce3 /drivers/acpi/utilities
parent3c5c363826e435cf4d54d917202567e5b57cae5f (diff)
[ACPI] ACPICA 20060113
Added 2006 copyright. At SuSE's suggestion, enabled all error messages without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively. This preserves all error and warning messages in the non-debug version of the ACPICA code (this has been referred to as the "debug lite" option.) Over 200 cases were converted to create a total of over 380 error/warning messages across the ACPICA code. This increases the code and data size of the default non-debug version by about 13K. Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages. The size of the debug version remains about the same. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r--drivers/acpi/utilities/utalloc.c32
-rw-r--r--drivers/acpi/utilities/utcache.c2
-rw-r--r--drivers/acpi/utilities/utcopy.c7
-rw-r--r--drivers/acpi/utilities/utdebug.c2
-rw-r--r--drivers/acpi/utilities/utdelete.c9
-rw-r--r--drivers/acpi/utilities/uteval.c24
-rw-r--r--drivers/acpi/utilities/utglobal.c21
-rw-r--r--drivers/acpi/utilities/utinit.c7
-rw-r--r--drivers/acpi/utilities/utmath.c10
-rw-r--r--drivers/acpi/utilities/utmisc.c18
-rw-r--r--drivers/acpi/utilities/utmutex.c37
-rw-r--r--drivers/acpi/utilities/utobject.c28
-rw-r--r--drivers/acpi/utilities/utresrc.c2
-rw-r--r--drivers/acpi/utilities/utstate.c2
-rw-r--r--drivers/acpi/utilities/utxface.c7
15 files changed, 84 insertions, 124 deletions
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
index b11b7ed788c6..0efcbdf7e620 100644
--- a/drivers/acpi/utilities/utalloc.c
+++ b/drivers/acpi/utilities/utalloc.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -301,7 +301,7 @@ 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, component, 304 _ACPI_REPORT_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\n"));
306 size = 1; 306 size = 1;
307 } 307 }
@@ -310,7 +310,7 @@ 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, component, 313 _ACPI_REPORT_ERROR(module, line,
314 ("ut_allocate: Could not allocate size %X\n", 314 ("ut_allocate: Could not allocate size %X\n",
315 (u32) size)); 315 (u32) size));
316 316
@@ -344,7 +344,7 @@ 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, component, 347 _ACPI_REPORT_ERROR(module, line,
348 ("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n")); 348 ("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n"));
349 size = 1; 349 size = 1;
350 } 350 }
@@ -353,7 +353,7 @@ 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, component, 356 _ACPI_REPORT_ERROR(module, line,
357 ("ut_callocate: Could not allocate size %X\n", 357 ("ut_callocate: Could not allocate size %X\n",
358 (u32) size)); 358 (u32) size));
359 return_PTR(NULL); 359 return_PTR(NULL);
@@ -480,7 +480,7 @@ void *acpi_ut_callocate_and_track(acpi_size size,
480 if (!allocation) { 480 if (!allocation) {
481 /* Report allocation error */ 481 /* Report allocation error */
482 482
483 _ACPI_REPORT_ERROR(module, line, component, 483 _ACPI_REPORT_ERROR(module, line,
484 ("ut_callocate: Could not allocate size %X\n", 484 ("ut_callocate: Could not allocate size %X\n",
485 (u32) size)); 485 (u32) size));
486 return (NULL); 486 return (NULL);
@@ -524,7 +524,7 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line)
524 ACPI_FUNCTION_TRACE_PTR("ut_free", allocation); 524 ACPI_FUNCTION_TRACE_PTR("ut_free", allocation);
525 525
526 if (NULL == allocation) { 526 if (NULL == allocation) {
527 _ACPI_REPORT_ERROR(module, line, component, 527 _ACPI_REPORT_ERROR(module, line,
528 ("acpi_ut_free: Attempt to delete a NULL address\n")); 528 ("acpi_ut_free: Attempt to delete a NULL address\n"));
529 529
530 return_VOID; 530 return_VOID;
@@ -540,8 +540,8 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line)
540 status = acpi_ut_remove_allocation(debug_block, 540 status = acpi_ut_remove_allocation(debug_block,
541 component, module, line); 541 component, module, line);
542 if (ACPI_FAILURE(status)) { 542 if (ACPI_FAILURE(status)) {
543 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Could not free memory, %s\n", 543 ACPI_REPORT_ERROR(("Could not free memory, %s\n",
544 acpi_format_exception(status))); 544 acpi_format_exception(status)));
545 } 545 }
546 546
547 acpi_os_free(debug_block); 547 acpi_os_free(debug_block);
@@ -626,8 +626,8 @@ acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation,
626 if (element) { 626 if (element) {
627 ACPI_REPORT_ERROR(("ut_track_allocation: Allocation already present in list! (%p)\n", allocation)); 627 ACPI_REPORT_ERROR(("ut_track_allocation: Allocation already present in list! (%p)\n", allocation));
628 628
629 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Element %p Address %p\n", 629 ACPI_REPORT_ERROR(("Element %p Address %p\n",
630 element, allocation)); 630 element, allocation));
631 631
632 goto unlock_and_exit; 632 goto unlock_and_exit;
633 } 633 }
@@ -687,7 +687,7 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
687 if (NULL == mem_list->list_head) { 687 if (NULL == mem_list->list_head) {
688 /* No allocations! */ 688 /* No allocations! */
689 689
690 _ACPI_REPORT_ERROR(module, line, component, 690 _ACPI_REPORT_ERROR(module, line,
691 ("ut_remove_allocation: Empty allocation list, nothing to free!\n")); 691 ("ut_remove_allocation: Empty allocation list, nothing to free!\n"));
692 692
693 return_ACPI_STATUS(AE_OK); 693 return_ACPI_STATUS(AE_OK);
@@ -863,12 +863,10 @@ void acpi_ut_dump_allocations(u32 component, char *module)
863 /* Print summary */ 863 /* Print summary */
864 864
865 if (!num_outstanding) { 865 if (!num_outstanding) {
866 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 866 ACPI_REPORT_INFO(("No outstanding allocations\n"));
867 "No outstanding allocations\n"));
868 } else { 867 } else {
869 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 868 ACPI_REPORT_ERROR(("%d(%X) Outstanding allocations\n",
870 "%d(%X) Outstanding allocations\n", 869 num_outstanding, num_outstanding));
871 num_outstanding, num_outstanding));
872 } 870 }
873 871
874 return_VOID; 872 return_VOID;
diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c
index 93d48681d276..2177cb1ef2c4 100644
--- a/drivers/acpi/utilities/utcache.c
+++ b/drivers/acpi/utilities/utcache.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
index 568df9e42f89..1a4da006822a 100644
--- a/drivers/acpi/utilities/utcopy.c
+++ b/drivers/acpi/utilities/utcopy.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -606,8 +606,7 @@ 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_DEBUG_PRINT((ACPI_DB_ERROR, 609 ACPI_REPORT_ERROR(("Packages as parameters not implemented!\n"));
610 "Packages as parameters not implemented!\n"));
611 610
612 return_ACPI_STATUS(AE_NOT_IMPLEMENTED); 611 return_ACPI_STATUS(AE_NOT_IMPLEMENTED);
613 } 612 }
@@ -870,7 +869,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
870 count + 869 count +
871 1) * sizeof(void *)); 870 1) * sizeof(void *));
872 if (!dest_obj->package.elements) { 871 if (!dest_obj->package.elements) {
873 ACPI_REPORT_ERROR(("aml_build_copy_internal_package_object: Package allocation failure\n")); 872 ACPI_REPORT_ERROR(("Package allocation failure\n"));
874 return_ACPI_STATUS(AE_NO_MEMORY); 873 return_ACPI_STATUS(AE_NO_MEMORY);
875 } 874 }
876 875
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
index d80e92639932..35f3d581e034 100644
--- a/drivers/acpi/utilities/utdebug.c
+++ b/drivers/acpi/utilities/utdebug.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index 2bc878f7a127..1079a1a1f195 100644
--- a/drivers/acpi/utilities/utdelete.c
+++ b/drivers/acpi/utilities/utdelete.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -363,8 +363,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
363 363
364 default: 364 default:
365 365
366 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown action (%X)\n", 366 ACPI_REPORT_ERROR(("Unknown action (%X)\n", action));
367 action));
368 break; 367 break;
369 } 368 }
370 369
@@ -374,9 +373,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action)
374 */ 373 */
375 if (count > ACPI_MAX_REFERENCE_COUNT) { 374 if (count > ACPI_MAX_REFERENCE_COUNT) {
376 375
377 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 376 ACPI_REPORT_WARNING(("Large Reference Count (%X) in object %p\n\n", count, object));
378 "**** Warning **** Large Reference Count (%X) in object %p\n\n",
379 count, object));
380 } 377 }
381 378
382 return; 379 return;
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index cd63a2d93fe3..f4dc374a0eec 100644
--- a/drivers/acpi/utilities/uteval.c
+++ b/drivers/acpi/utilities/uteval.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -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_METHOD_ERROR("Method execution failed", 157 ACPI_REPORT_MTERROR("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,9 +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_METHOD_ERROR("No object was returned from", 168 ACPI_REPORT_MTERROR("No object was returned from",
169 prefix_node, path, 169 prefix_node, path, AE_NOT_EXIST);
170 AE_NOT_EXIST);
171 170
172 return_ACPI_STATUS(AE_NOT_EXIST); 171 return_ACPI_STATUS(AE_NOT_EXIST);
173 } 172 }
@@ -212,15 +211,10 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
212 /* Is the return object one of the expected types? */ 211 /* Is the return object one of the expected types? */
213 212
214 if (!(expected_return_btypes & return_btype)) { 213 if (!(expected_return_btypes & return_btype)) {
215 ACPI_REPORT_METHOD_ERROR("Return object type is incorrect", 214 ACPI_REPORT_MTERROR("Return object type is incorrect",
216 prefix_node, path, AE_TYPE); 215 prefix_node, path, AE_TYPE);
217 216
218 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 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));
219 "Type returned from %s was incorrect: %s, expected Btypes: %X\n",
220 path,
221 acpi_ut_get_object_type_name(info.
222 return_object),
223 expected_return_btypes));
224 218
225 /* On error exit, we must delete the return object */ 219 /* On error exit, we must delete the return object */
226 220
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 7c59c2b0d953..87ca9a0a8b76 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -67,8 +67,11 @@ const char *acpi_format_exception(acpi_status status)
67 acpi_status sub_status; 67 acpi_status sub_status;
68 const char *exception = NULL; 68 const char *exception = NULL;
69 69
70 ACPI_FUNCTION_NAME("format_exception"); 70 ACPI_FUNCTION_ENTRY();
71 71
72 /*
73 * Status is composed of two parts, a "type" and an actual code
74 */
72 sub_status = (status & ~AE_CODE_MASK); 75 sub_status = (status & ~AE_CODE_MASK);
73 76
74 switch (status & AE_CODE_MASK) { 77 switch (status & AE_CODE_MASK) {
@@ -118,13 +121,13 @@ const char *acpi_format_exception(acpi_status status)
118 if (!exception) { 121 if (!exception) {
119 /* Exception code was not recognized */ 122 /* Exception code was not recognized */
120 123
121 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 124 ACPI_REPORT_ERROR(("Unknown exception code: 0x%8.8X\n",
122 "Unknown exception code: 0x%8.8X\n", status)); 125 status));
123 126
124 return ((const char *)"UNKNOWN_STATUS_CODE"); 127 exception = "UNKNOWN_STATUS_CODE";
125 } 128 }
126 129
127 return ((const char *)exception); 130 return (ACPI_CAST_PTR(const char, exception));
128} 131}
129 132
130/******************************************************************************* 133/*******************************************************************************
@@ -519,7 +522,7 @@ char *acpi_ut_get_event_name(u32 event_id)
519 return ("invalid_event_iD"); 522 return ("invalid_event_iD");
520 } 523 }
521 524
522 return ((char *)acpi_gbl_event_types[event_id]); 525 return (ACPI_CAST_PTR(char, acpi_gbl_event_types[event_id]));
523} 526}
524 527
525/******************************************************************************* 528/*******************************************************************************
@@ -586,10 +589,10 @@ char *acpi_ut_get_type_name(acpi_object_type type)
586{ 589{
587 590
588 if (type > ACPI_TYPE_INVALID) { 591 if (type > ACPI_TYPE_INVALID) {
589 return ((char *)acpi_gbl_bad_type); 592 return (ACPI_CAST_PTR(char, acpi_gbl_bad_type));
590 } 593 }
591 594
592 return ((char *)acpi_gbl_ns_type_names[type]); 595 return (ACPI_CAST_PTR(char, acpi_gbl_ns_type_names[type]));
593} 596}
594 597
595char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc) 598char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc)
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c
index 9dde82b0beaf..7565ba6f90d5 100644
--- a/drivers/acpi/utilities/utinit.c
+++ b/drivers/acpi/utilities/utinit.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -221,15 +221,14 @@ 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_DEBUG_PRINT((ACPI_DB_ERROR, 224 ACPI_REPORT_ERROR(("ACPI Subsystem is already terminated\n"));
225 "ACPI Subsystem is already terminated\n"));
226 return_VOID; 225 return_VOID;
227 } 226 }
228 227
229 /* Subsystem appears active, go ahead and shut it down */ 228 /* Subsystem appears active, go ahead and shut it down */
230 229
231 acpi_gbl_shutdown = TRUE; 230 acpi_gbl_shutdown = TRUE;
232 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem...\n")); 231 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n"));
233 232
234 /* Close the acpi_event Handling */ 233 /* Close the acpi_event Handling */
235 234
diff --git a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c
index 68a0a6f94129..06214201329d 100644
--- a/drivers/acpi/utilities/utmath.c
+++ b/drivers/acpi/utilities/utmath.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -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(("acpi_ut_short_divide: Divide by zero\n")); 85 ACPI_REPORT_ERROR(("Divide by zero\n"));
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(("acpi_ut_divide: Divide by zero\n")); 147 ACPI_REPORT_ERROR(("Divide by zero\n"));
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(("acpi_ut_short_divide: Divide by zero\n")); 269 ACPI_REPORT_ERROR(("Divide by zero\n"));
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(("acpi_ut_divide: Divide by zero\n")); 295 ACPI_REPORT_ERROR(("Divide by zero\n"));
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 48d511d5c04b..a77ffcd5570f 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -841,7 +841,6 @@ u8 acpi_ut_generate_checksum(u8 * buffer, u32 length)
841 * 841 *
842 * PARAMETERS: module_name - Caller's module name (for error output) 842 * PARAMETERS: module_name - Caller's module name (for error output)
843 * line_number - Caller's line number (for error output) 843 * line_number - Caller's line number (for error output)
844 * component_id - Caller's component ID (for error output)
845 * 844 *
846 * RETURN: None 845 * RETURN: None
847 * 846 *
@@ -849,10 +848,10 @@ u8 acpi_ut_generate_checksum(u8 * buffer, u32 length)
849 * 848 *
850 ******************************************************************************/ 849 ******************************************************************************/
851 850
852void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id) 851void acpi_ut_report_error(char *module_name, u32 line_number)
853{ 852{
854 853
855 acpi_os_printf("%8s-%04d: *** Error: ", module_name, line_number); 854 acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number);
856} 855}
857 856
858/******************************************************************************* 857/*******************************************************************************
@@ -861,7 +860,6 @@ void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id)
861 * 860 *
862 * PARAMETERS: module_name - Caller's module name (for error output) 861 * PARAMETERS: module_name - Caller's module name (for error output)
863 * line_number - Caller's line number (for error output) 862 * line_number - Caller's line number (for error output)
864 * component_id - Caller's component ID (for error output)
865 * 863 *
866 * RETURN: None 864 * RETURN: None
867 * 865 *
@@ -869,11 +867,10 @@ void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id)
869 * 867 *
870 ******************************************************************************/ 868 ******************************************************************************/
871 869
872void 870void acpi_ut_report_warning(char *module_name, u32 line_number)
873acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id)
874{ 871{
875 872
876 acpi_os_printf("%8s-%04d: *** Warning: ", module_name, line_number); 873 acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number);
877} 874}
878 875
879/******************************************************************************* 876/*******************************************************************************
@@ -882,7 +879,6 @@ acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id)
882 * 879 *
883 * PARAMETERS: module_name - Caller's module name (for error output) 880 * PARAMETERS: module_name - Caller's module name (for error output)
884 * line_number - Caller's line number (for error output) 881 * line_number - Caller's line number (for error output)
885 * component_id - Caller's component ID (for error output)
886 * 882 *
887 * RETURN: None 883 * RETURN: None
888 * 884 *
@@ -890,8 +886,8 @@ acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id)
890 * 886 *
891 ******************************************************************************/ 887 ******************************************************************************/
892 888
893void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id) 889void acpi_ut_report_info(char *module_name, u32 line_number)
894{ 890{
895 891
896 acpi_os_printf("%8s-%04d: *** Info: ", module_name, line_number); 892 acpi_os_printf("ACPI (%s-%04d): ", module_name, line_number);
897} 893}
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c
index e158b1b6313b..ffaff55270b1 100644
--- a/drivers/acpi/utilities/utmutex.c
+++ b/drivers/acpi/utilities/utmutex.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -216,21 +216,12 @@ 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_DEBUG_PRINT((ACPI_DB_ERROR, 219 ACPI_REPORT_ERROR(("Mutex [%s] already acquired by this thread [%X]\n", acpi_ut_get_mutex_name(mutex_id), this_thread_id));
220 "Mutex [%s] already acquired by this thread [%X]\n",
221 acpi_ut_get_mutex_name
222 (mutex_id),
223 this_thread_id));
224 220
225 return (AE_ALREADY_ACQUIRED); 221 return (AE_ALREADY_ACQUIRED);
226 } 222 }
227 223
228 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 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)));
229 "Invalid acquire order: Thread %X owns [%s], wants [%s]\n",
230 this_thread_id,
231 acpi_ut_get_mutex_name(i),
232 acpi_ut_get_mutex_name
233 (mutex_id)));
234 225
235 return (AE_ACQUIRE_DEADLOCK); 226 return (AE_ACQUIRE_DEADLOCK);
236 } 227 }
@@ -253,11 +244,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
253 acpi_gbl_mutex_info[mutex_id].use_count++; 244 acpi_gbl_mutex_info[mutex_id].use_count++;
254 acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; 245 acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id;
255 } else { 246 } else {
256 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 247 ACPI_REPORT_ERROR(("Thread %X could not acquire Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status)));
257 "Thread %X could not acquire Mutex [%s] %s\n",
258 this_thread_id,
259 acpi_ut_get_mutex_name(mutex_id),
260 acpi_format_exception(status)));
261 } 248 }
262 249
263 return (status); 250 return (status);
@@ -295,9 +282,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
295 * Mutex must be acquired in order to release it! 282 * Mutex must be acquired in order to release it!
296 */ 283 */
297 if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { 284 if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) {
298 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 285 ACPI_REPORT_ERROR(("Mutex [%X] is not acquired, cannot release\n", mutex_id));
299 "Mutex [%s] is not acquired, cannot release\n",
300 acpi_ut_get_mutex_name(mutex_id)));
301 286
302 return (AE_NOT_ACQUIRED); 287 return (AE_NOT_ACQUIRED);
303 } 288 }
@@ -318,11 +303,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
318 continue; 303 continue;
319 } 304 }
320 305
321 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 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)));
322 "Invalid release order: owns [%s], releasing [%s]\n",
323 acpi_ut_get_mutex_name(i),
324 acpi_ut_get_mutex_name
325 (mutex_id)));
326 307
327 return (AE_RELEASE_DEADLOCK); 308 return (AE_RELEASE_DEADLOCK);
328 } 309 }
@@ -338,11 +319,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
338 acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); 319 acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1);
339 320
340 if (ACPI_FAILURE(status)) { 321 if (ACPI_FAILURE(status)) {
341 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 322 ACPI_REPORT_ERROR(("Thread %X could not release Mutex [%X] %s\n", this_thread_id, mutex_id, acpi_format_exception(status)));
342 "Thread %X could not release Mutex [%s] %s\n",
343 this_thread_id,
344 acpi_ut_get_mutex_name(mutex_id),
345 acpi_format_exception(status)));
346 } else { 323 } else {
347 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, 324 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
348 "Thread %X released Mutex [%s]\n", 325 "Thread %X released Mutex [%s]\n",
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
index 3015e1540053..1b6b21577805 100644
--- a/drivers/acpi/utilities/utobject.c
+++ b/drivers/acpi/utilities/utobject.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -177,7 +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(("create_buffer: could not allocate size %X\n", (u32) buffer_size)); 180 ACPI_REPORT_ERROR(("Could not allocate size %X\n",
181 (u32) buffer_size));
181 acpi_ut_remove_reference(buffer_desc); 182 acpi_ut_remove_reference(buffer_desc);
182 return_PTR(NULL); 183 return_PTR(NULL);
183 } 184 }
@@ -228,7 +229,8 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
228 */ 229 */
229 string = ACPI_MEM_CALLOCATE(string_size + 1); 230 string = ACPI_MEM_CALLOCATE(string_size + 1);
230 if (!string) { 231 if (!string) {
231 ACPI_REPORT_ERROR(("create_string: could not allocate size %X\n", (u32) string_size)); 232 ACPI_REPORT_ERROR(("Could not allocate size %X\n",
233 (u32) string_size));
232 acpi_ut_remove_reference(string_desc); 234 acpi_ut_remove_reference(string_desc);
233 return_PTR(NULL); 235 return_PTR(NULL);
234 } 236 }
@@ -310,7 +312,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name,
310 312
311 object = acpi_os_acquire_object(acpi_gbl_operand_cache); 313 object = acpi_os_acquire_object(acpi_gbl_operand_cache);
312 if (!object) { 314 if (!object) {
313 _ACPI_REPORT_ERROR(module_name, line_number, component_id, 315 _ACPI_REPORT_ERROR(module_name, line_number,
314 ("Could not allocate an object descriptor\n")); 316 ("Could not allocate an object descriptor\n"));
315 317
316 return_PTR(NULL); 318 return_PTR(NULL);
@@ -345,9 +347,9 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)
345 /* Object must be an union acpi_operand_object */ 347 /* Object must be an union acpi_operand_object */
346 348
347 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { 349 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) {
348 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 350 ACPI_REPORT_ERROR(("%p is not an ACPI Operand object [%s]\n",
349 "%p is not an ACPI Operand object [%s]\n", 351 object,
350 object, acpi_ut_get_descriptor_name(object))); 352 acpi_ut_get_descriptor_name(object)));
351 return_VOID; 353 return_VOID;
352 } 354 }
353 355
@@ -449,10 +451,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
449 * Notably, Locals and Args are not supported, but this may be 451 * Notably, Locals and Args are not supported, but this may be
450 * required eventually. 452 * required eventually.
451 */ 453 */
452 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 454 ACPI_REPORT_ERROR(("Unsupported Reference opcode=%X in object %p\n", internal_object->reference.opcode, internal_object));
453 "Unsupported Reference opcode=%X in object %p\n",
454 internal_object->reference.opcode,
455 internal_object));
456 status = AE_TYPE; 455 status = AE_TYPE;
457 break; 456 break;
458 } 457 }
@@ -460,10 +459,9 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
460 459
461 default: 460 default:
462 461
463 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 462 ACPI_REPORT_ERROR(("Unsupported type=%X in object %p\n",
464 "Unsupported type=%X in object %p\n", 463 ACPI_GET_OBJECT_TYPE(internal_object),
465 ACPI_GET_OBJECT_TYPE(internal_object), 464 internal_object));
466 internal_object));
467 status = AE_TYPE; 465 status = AE_TYPE;
468 break; 466 break;
469 } 467 }
diff --git a/drivers/acpi/utilities/utresrc.c b/drivers/acpi/utilities/utresrc.c
index eaf0edec6efe..36bf9e4bf529 100644
--- a/drivers/acpi/utilities/utresrc.c
+++ b/drivers/acpi/utilities/utresrc.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/utilities/utstate.c b/drivers/acpi/utilities/utstate.c
index 6ff1d7073349..4b134a722907 100644
--- a/drivers/acpi/utilities/utstate.c
+++ b/drivers/acpi/utilities/utstate.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c
index 57adc5bc02f3..b4bc94883200 100644
--- a/drivers/acpi/utilities/utxface.c
+++ b/drivers/acpi/utilities/utxface.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -75,7 +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(("OSD failed to initialize, %s\n", 78 ACPI_REPORT_ERROR(("OSL failed to initialize, %s\n",
79 acpi_format_exception(status))); 79 acpi_format_exception(status)));
80 return_ACPI_STATUS(status); 80 return_ACPI_STATUS(status);
81 } 81 }
@@ -154,8 +154,7 @@ acpi_status acpi_enable_subsystem(u32 flags)
154 154
155 status = acpi_enable(); 155 status = acpi_enable();
156 if (ACPI_FAILURE(status)) { 156 if (ACPI_FAILURE(status)) {
157 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 157 ACPI_REPORT_WARNING(("acpi_enable failed\n"));
158 "acpi_enable failed.\n"));
159 return_ACPI_STATUS(status); 158 return_ACPI_STATUS(status);
160 } 159 }
161 } 160 }