summaryrefslogtreecommitdiffstats
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)
downloadop-kernel-dev-4a90c7e86202f46fa9af011bdbcdf36e355d1721.zip
op-kernel-dev-4a90c7e86202f46fa9af011bdbcdf36e355d1721.tar.gz
[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 0fa8f72db..49ba151 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -443,56 +443,66 @@
#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
/*
- * Reporting macros that are never compiled out
+ * Module name is include in both debug and non-debug versions primarily for
+ * error messages. The __FILE__ macro is not very useful for this, because it
+ * often includes the entire pathname to the module
*/
-#define ACPI_PARAM_LIST(pl) pl
+#if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
+
+#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name;
+#else
+#define ACPI_MODULE_NAME(name)
+#endif
/*
- * Error reporting. These versions add callers module and line#.
- *
- * Since _acpi_module_name gets compiled out when ACPI_DEBUG_OUTPUT
- * isn't defined, only use it in debug mode.
+ * Ascii error messages can be configured out
*/
-#ifdef ACPI_DEBUG_OUTPUT
+#ifndef ACPI_NO_ERROR_MESSAGES
+
+#define ACPI_PARAM_LIST(pl) pl
+#define ACPI_LOCATION_INFO _acpi_module_name, __LINE__
-#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_acpi_module_name,__LINE__,_COMPONENT); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_acpi_module_name,__LINE__,_COMPONENT); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_acpi_module_name,__LINE__,_COMPONENT); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_acpi_module_name,__LINE__,_COMPONENT, s, e);
+/*
+ * Error reporting. Callers module and line number are inserted automatically
+ * These macros are used for both the debug and non-debug versions of the code
+ */
+#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info (ACPI_LOCATION_INFO); \
+ acpi_os_printf ACPI_PARAM_LIST (fp);}
+#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error (ACPI_LOCATION_INFO); \
+ acpi_os_printf ACPI_PARAM_LIST (fp);}
+#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning (ACPI_LOCATION_INFO); \
+ acpi_os_printf ACPI_PARAM_LIST (fp);}
+#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error (ACPI_LOCATION_INFO, \
+ s, e);
+#define ACPI_REPORT_MTERROR(s,n,p,e) acpi_ns_report_method_error (ACPI_LOCATION_INFO, \
+ s, n, p, e);
-#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error(_acpi_module_name,__LINE__,_COMPONENT, s, n, p, e);
+/* Error reporting. These versions pass thru the module and lineno */
+#define _ACPI_REPORT_INFO(a,b,fp) {acpi_ut_report_info (a,b); \
+ acpi_os_printf ACPI_PARAM_LIST (fp);}
+#define _ACPI_REPORT_ERROR(a,b,fp) {acpi_ut_report_error (a,b); \
+ acpi_os_printf ACPI_PARAM_LIST (fp);}
+#define _ACPI_REPORT_WARNING(a,b,fp) {acpi_ut_report_warning (a,b); \
+ acpi_os_printf ACPI_PARAM_LIST (fp);}
#else
-#define ACPI_REPORT_INFO(fp) {acpi_ut_report_info("ACPI",__LINE__,_COMPONENT); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error("ACPI",__LINE__,_COMPONENT); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning("ACPI",__LINE__,_COMPONENT); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error("ACPI",__LINE__,_COMPONENT, s, e);
-
-#define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error("ACPI",__LINE__,_COMPONENT, s, n, p, e);
+/* No error messages */
+#define ACPI_REPORT_INFO(fp)
+#define ACPI_REPORT_ERROR(fp)
+#define ACPI_REPORT_WARNING(fp)
+#define ACPI_REPORT_NSERROR(s,e)
+#define ACPI_REPORT_MTERROR(s,n,p,e)
+#define _ACPI_REPORT_INFO(a,b,c,fp)
+#define _ACPI_REPORT_ERROR(a,b,c,fp)
+#define _ACPI_REPORT_WARNING(a,b,c,fp)
#endif
-/* Error reporting. These versions pass thru the module and line# */
-
-#define _ACPI_REPORT_INFO(a,b,c,fp) {acpi_ut_report_info(a,b,c); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define _ACPI_REPORT_ERROR(a,b,c,fp) {acpi_ut_report_error(a,b,c); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-#define _ACPI_REPORT_WARNING(a,b,c,fp) {acpi_ut_report_warning(a,b,c); \
- acpi_os_printf ACPI_PARAM_LIST(fp);}
-
/*
* Debug macros that are conditionally compiled
*/
#ifdef ACPI_DEBUG_OUTPUT
-#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name;
/*
* Common parameters used for debug output functions:
@@ -649,9 +659,6 @@
* This is the non-debug case -- make everything go away,
* leaving no executable debug code!
*/
-#define ACPI_MODULE_NAME(name)
-#define _acpi_module_name ""
-
#define ACPI_DEBUG_EXEC(a)
#define ACPI_NORMAL_EXEC(a) a;
OpenPOWER on IntegriCloud