aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acmacros.h
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 /include/acpi/acmacros.h
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 'include/acpi/acmacros.h')
-rw-r--r--include/acpi/acmacros.h83
1 files changed, 45 insertions, 38 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 0fa8f72dbace..49ba151766de 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -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
@@ -443,56 +443,66 @@
443#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) 443#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
444 444
445/* 445/*
446 * Reporting macros that are never compiled out 446 * 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
448 * often includes the entire pathname to the module
447 */ 449 */
448#define ACPI_PARAM_LIST(pl) pl 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;
453#else
454#define ACPI_MODULE_NAME(name)
455#endif
449 456
450/* 457/*
451 * Error reporting. These versions add callers module and line#. 458 * Ascii error messages can be configured out
452 *
453 * Since _acpi_module_name gets compiled out when ACPI_DEBUG_OUTPUT
454 * isn't defined, only use it in debug mode.
455 */ 459 */
456#ifdef ACPI_DEBUG_OUTPUT 460#ifndef ACPI_NO_ERROR_MESSAGES
461
462#define ACPI_PARAM_LIST(pl) pl
463#define ACPI_LOCATION_INFO _acpi_module_name, __LINE__
457 464
458#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_acpi_module_name,__LINE__,_COMPONENT); \ 465/*
459 acpi_os_printf ACPI_PARAM_LIST(fp);} 466 * Error reporting. Callers module and line number are inserted automatically
460#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_acpi_module_name,__LINE__,_COMPONENT); \ 467 * These macros are used for both the debug and non-debug versions of the code
461 acpi_os_printf ACPI_PARAM_LIST(fp);} 468 */
462#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_acpi_module_name,__LINE__,_COMPONENT); \ 469#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info (ACPI_LOCATION_INFO); \
463 acpi_os_printf ACPI_PARAM_LIST(fp);} 470 acpi_os_printf ACPI_PARAM_LIST (fp);}
464#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_acpi_module_name,__LINE__,_COMPONENT, s, e); 471#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error (ACPI_LOCATION_INFO); \
472 acpi_os_printf ACPI_PARAM_LIST (fp);}
473#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning (ACPI_LOCATION_INFO); \
474 acpi_os_printf ACPI_PARAM_LIST (fp);}
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);
465 479
466#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error(_acpi_module_name,__LINE__,_COMPONENT, s, n, p, e); 480/* Error reporting. These versions pass thru the module and lineno */
467 481
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);}
468#else 488#else
469 489
470#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info("ACPI",__LINE__,_COMPONENT); \ 490/* No error messages */
471 acpi_os_printf ACPI_PARAM_LIST(fp);}
472#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error("ACPI",__LINE__,_COMPONENT); \
473 acpi_os_printf ACPI_PARAM_LIST(fp);}
474#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning("ACPI",__LINE__,_COMPONENT); \
475 acpi_os_printf ACPI_PARAM_LIST(fp);}
476#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error("ACPI",__LINE__,_COMPONENT, s, e);
477
478#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error("ACPI",__LINE__,_COMPONENT, s, n, p, e);
479 491
492#define ACPI_REPORT_INFO(fp)
493#define ACPI_REPORT_ERROR(fp)
494#define ACPI_REPORT_WARNING(fp)
495#define ACPI_REPORT_NSERROR(s,e)
496#define ACPI_REPORT_MTERROR(s,n,p,e)
497#define _ACPI_REPORT_INFO(a,b,c,fp)
498#define _ACPI_REPORT_ERROR(a,b,c,fp)
499#define _ACPI_REPORT_WARNING(a,b,c,fp)
480#endif 500#endif
481 501
482/* Error reporting. These versions pass thru the module and line# */
483
484#define _ACPI_REPORT_INFO(a,b,c,fp) {acpi_ut_report_info(a,b,c); \
485 acpi_os_printf ACPI_PARAM_LIST(fp);}
486#define _ACPI_REPORT_ERROR(a,b,c,fp) {acpi_ut_report_error(a,b,c); \
487 acpi_os_printf ACPI_PARAM_LIST(fp);}
488#define _ACPI_REPORT_WARNING(a,b,c,fp) {acpi_ut_report_warning(a,b,c); \
489 acpi_os_printf ACPI_PARAM_LIST(fp);}
490
491/* 502/*
492 * Debug macros that are conditionally compiled 503 * Debug macros that are conditionally compiled
493 */ 504 */
494#ifdef ACPI_DEBUG_OUTPUT 505#ifdef ACPI_DEBUG_OUTPUT
495#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name;
496 506
497/* 507/*
498 * Common parameters used for debug output functions: 508 * Common parameters used for debug output functions:
@@ -649,9 +659,6 @@
649 * This is the non-debug case -- make everything go away, 659 * This is the non-debug case -- make everything go away,
650 * leaving no executable debug code! 660 * leaving no executable debug code!
651 */ 661 */
652#define ACPI_MODULE_NAME(name)
653#define _acpi_module_name ""
654
655#define ACPI_DEBUG_EXEC(a) 662#define ACPI_DEBUG_EXEC(a)
656#define ACPI_NORMAL_EXEC(a) a; 663#define ACPI_NORMAL_EXEC(a) a;
657 664