@@ -134,6 +134,51 @@ const char *__init acpi_ut_validate_exception(acpi_status status)
*
******************************************************************************/
+#ifdef NDEBUG
+void ACPI_INTERNAL_VAR_XFACE __init
+acpi_ut_error(const char *module_name, void *addr, char *format, ...)
+{
+ va_list args;
+
+ acpi_os_printf("ACPI Error (%s-%p): ", module_name, addr);
+
+ va_start(args, format);
+ acpi_os_vprintf(format, args);
+ acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
+ va_end(args);
+}
+
+void ACPI_INTERNAL_VAR_XFACE __init
+acpi_ut_warning(const char *module_name, void *addr, char *format, ...)
+{
+ va_list args;
+
+ acpi_os_printf("ACPI Warning (%s-%p): ", module_name, addr);
+
+ va_start(args, format);
+ acpi_os_vprintf(format, args);
+ acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
+ va_end(args);
+ va_end(args);
+}
+
+void ACPI_INTERNAL_VAR_XFACE __init
+acpi_ut_info(const char *module_name, void *addr, char *format, ...)
+{
+ va_list args;
+
+ /*
+ * Removed module_name, line_number, and acpica version, not needed
+ * for info output
+ */
+ acpi_os_printf("ACPI: ");
+
+ va_start(args, format);
+ acpi_os_vprintf(format, args);
+ acpi_os_printf("\n");
+ va_end(args);
+}
+#else
void ACPI_INTERNAL_VAR_XFACE __init
acpi_ut_error(const char *module_name, u32 line_number, char *format, ...)
{
@@ -177,3 +222,4 @@ acpi_ut_info(const char *module_name, u32 line_number, char *format, ...)
acpi_os_printf("\n");
va_end(args);
}
+#endif
@@ -422,7 +422,11 @@
* Ascii error messages can be configured out
*/
#ifndef ACPI_NO_ERROR_MESSAGES
+#ifdef NDEBUG
+#define AE_INFO _acpi_module_name, current_text_addr()
+#else
#define AE_INFO _acpi_module_name, __LINE__
+#endif
/*
* Error reporting. Callers module and line number are inserted by AE_INFO,
@@ -174,6 +174,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level,
u32 component_id,
char *format, ...) ACPI_PRINTF_LIKE(6);
+#ifdef NDEBUG
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_error(const char *module_name,
+ void *addr, char *format, ...) ACPI_PRINTF_LIKE(3);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_exception(const char *module_name,
+ void *addr,
+ acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_warning(const char *module_name,
+ void *addr, char *format, ...) ACPI_PRINTF_LIKE(3);
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_info(const char *module_name,
+ void *addr, char *format, ...) ACPI_PRINTF_LIKE(3);
+#else
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_error(const char *module_name,
u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
@@ -190,6 +208,7 @@ acpi_ut_warning(const char *module_name,
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_info(const char *module_name,
u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3);
+#endif
/*
* utmisc
When using xsplice, use of __LINE__ can generate spurious changes in functions due to embedded line numbers. For release builds, remove the use of these line numbers in the ACPI code and print the current text address instead. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> --- xen/drivers/acpi/utilities/utmisc.c | 46 +++++++++++++++++++++++++++++++++++++ xen/include/acpi/acmacros.h | 4 ++++ xen/include/acpi/acutils.h | 19 +++++++++++++++ 3 files changed, 69 insertions(+)