diff options
author | Bob Moore <robert.moore@intel.com> | 2013-05-29 21:59:21 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-01 15:54:30 -0400 |
commit | e1405ca5ebf1068a0d62afd2fec8f0354038147a (patch) | |
tree | 89ab8b0bb18695e25a23a6e8e8a56997ceb27544 /drivers | |
parent | f6f57f605eecd4f6a9b59b55bf91c50fe7b52186 (diff) |
ACPICA: Add BIOS error interface for predefined name validation support
BIOS error message for errors found in predefined names.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/acpica/acmacros.h | 10 | ||||
-rw-r--r-- | drivers/acpi/acpica/acutils.h | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/utxferror.c | 51 |
3 files changed, 59 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index 53666bd9193d..530a2f8c1252 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h | |||
@@ -374,10 +374,11 @@ | |||
374 | * the plist contains a set of parens to allow variable-length lists. | 374 | * the plist contains a set of parens to allow variable-length lists. |
375 | * These macros are used for both the debug and non-debug versions of the code. | 375 | * These macros are used for both the debug and non-debug versions of the code. |
376 | */ | 376 | */ |
377 | #define ACPI_ERROR_NAMESPACE(s, e) acpi_ut_namespace_error (AE_INFO, s, e); | 377 | #define ACPI_ERROR_NAMESPACE(s, e) acpi_ut_namespace_error (AE_INFO, s, e); |
378 | #define ACPI_ERROR_METHOD(s, n, p, e) acpi_ut_method_error (AE_INFO, s, n, p, e); | 378 | #define ACPI_ERROR_METHOD(s, n, p, e) acpi_ut_method_error (AE_INFO, s, n, p, e); |
379 | #define ACPI_WARN_PREDEFINED(plist) acpi_ut_predefined_warning plist | 379 | #define ACPI_WARN_PREDEFINED(plist) acpi_ut_predefined_warning plist |
380 | #define ACPI_INFO_PREDEFINED(plist) acpi_ut_predefined_info plist | 380 | #define ACPI_INFO_PREDEFINED(plist) acpi_ut_predefined_info plist |
381 | #define ACPI_BIOS_ERROR_PREDEFINED(plist) acpi_ut_predefined_bios_error plist | ||
381 | 382 | ||
382 | #else | 383 | #else |
383 | 384 | ||
@@ -387,6 +388,7 @@ | |||
387 | #define ACPI_ERROR_METHOD(s, n, p, e) | 388 | #define ACPI_ERROR_METHOD(s, n, p, e) |
388 | #define ACPI_WARN_PREDEFINED(plist) | 389 | #define ACPI_WARN_PREDEFINED(plist) |
389 | #define ACPI_INFO_PREDEFINED(plist) | 390 | #define ACPI_INFO_PREDEFINED(plist) |
391 | #define ACPI_BIOS_ERROR_PREDEFINED(plist) | ||
390 | 392 | ||
391 | #endif /* ACPI_NO_ERROR_MESSAGES */ | 393 | #endif /* ACPI_NO_ERROR_MESSAGES */ |
392 | 394 | ||
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 202f4f12d3e2..19e5cf72ab6a 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h | |||
@@ -670,6 +670,12 @@ acpi_ut_predefined_info(const char *module_name, | |||
670 | u32 line_number, | 670 | u32 line_number, |
671 | char *pathname, u8 node_flags, const char *format, ...); | 671 | char *pathname, u8 node_flags, const char *format, ...); |
672 | 672 | ||
673 | void ACPI_INTERNAL_VAR_XFACE | ||
674 | acpi_ut_predefined_bios_error(const char *module_name, | ||
675 | u32 line_number, | ||
676 | char *pathname, | ||
677 | u8 node_flags, const char *format, ...); | ||
678 | |||
673 | void | 679 | void |
674 | acpi_ut_namespace_error(const char *module_name, | 680 | acpi_ut_namespace_error(const char *module_name, |
675 | u32 line_number, | 681 | u32 line_number, |
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c index 976b6c734fce..61a2c1704ccf 100644 --- a/drivers/acpi/acpica/utxferror.c +++ b/drivers/acpi/acpica/utxferror.c | |||
@@ -82,8 +82,8 @@ extern FILE *acpi_gbl_output_file; | |||
82 | #define ACPI_MSG_EXCEPTION "ACPI Exception: " | 82 | #define ACPI_MSG_EXCEPTION "ACPI Exception: " |
83 | #define ACPI_MSG_WARNING "ACPI Warning: " | 83 | #define ACPI_MSG_WARNING "ACPI Warning: " |
84 | #define ACPI_MSG_INFO "ACPI: " | 84 | #define ACPI_MSG_INFO "ACPI: " |
85 | #define ACPI_MSG_BIOS_ERROR "ACPI BIOS Bug: Error: " | 85 | #define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): " |
86 | #define ACPI_MSG_BIOS_WARNING "ACPI BIOS Bug: Warning: " | 86 | #define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): " |
87 | /* | 87 | /* |
88 | * Common message suffix | 88 | * Common message suffix |
89 | */ | 89 | */ |
@@ -325,7 +325,7 @@ acpi_ut_predefined_warning(const char *module_name, | |||
325 | return; | 325 | return; |
326 | } | 326 | } |
327 | 327 | ||
328 | acpi_os_printf(ACPI_MSG_WARNING "For %s: ", pathname); | 328 | acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname); |
329 | 329 | ||
330 | va_start(arg_list, format); | 330 | va_start(arg_list, format); |
331 | acpi_os_vprintf(format, arg_list); | 331 | acpi_os_vprintf(format, arg_list); |
@@ -367,7 +367,50 @@ acpi_ut_predefined_info(const char *module_name, | |||
367 | return; | 367 | return; |
368 | } | 368 | } |
369 | 369 | ||
370 | acpi_os_printf(ACPI_MSG_INFO "For %s: ", pathname); | 370 | acpi_os_printf(ACPI_MSG_INFO "%s: ", pathname); |
371 | |||
372 | va_start(arg_list, format); | ||
373 | acpi_os_vprintf(format, arg_list); | ||
374 | ACPI_MSG_SUFFIX; | ||
375 | va_end(arg_list); | ||
376 | } | ||
377 | |||
378 | /******************************************************************************* | ||
379 | * | ||
380 | * FUNCTION: acpi_ut_predefined_bios_error | ||
381 | * | ||
382 | * PARAMETERS: module_name - Caller's module name (for error output) | ||
383 | * line_number - Caller's line number (for error output) | ||
384 | * pathname - Full pathname to the node | ||
385 | * node_flags - From Namespace node for the method/object | ||
386 | * format - Printf format string + additional args | ||
387 | * | ||
388 | * RETURN: None | ||
389 | * | ||
390 | * DESCRIPTION: BIOS error message for predefined names. Messages | ||
391 | * are only emitted the first time a problem with a particular | ||
392 | * method/object is detected. This prevents a flood of | ||
393 | * messages for methods that are repeatedly evaluated. | ||
394 | * | ||
395 | ******************************************************************************/ | ||
396 | |||
397 | void ACPI_INTERNAL_VAR_XFACE | ||
398 | acpi_ut_predefined_bios_error(const char *module_name, | ||
399 | u32 line_number, | ||
400 | char *pathname, | ||
401 | u8 node_flags, const char *format, ...) | ||
402 | { | ||
403 | va_list arg_list; | ||
404 | |||
405 | /* | ||
406 | * Warning messages for this method/object will be disabled after the | ||
407 | * first time a validation fails or an object is successfully repaired. | ||
408 | */ | ||
409 | if (node_flags & ANOBJ_EVALUATED) { | ||
410 | return; | ||
411 | } | ||
412 | |||
413 | acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s: ", pathname); | ||
371 | 414 | ||
372 | va_start(arg_list, format); | 415 | va_start(arg_list, format); |
373 | acpi_os_vprintf(format, arg_list); | 416 | acpi_os_vprintf(format, arg_list); |