summary refs log tree commit diff
path: root/drivers/acpi/acpica/utxferror.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2013-05-30 09:59:21 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-01 21:54:30 +0200
commite1405ca5ebf1068a0d62afd2fec8f0354038147a (patch)
tree89ab8b0bb18695e25a23a6e8e8a56997ceb27544 /drivers/acpi/acpica/utxferror.c
parentf6f57f605eecd4f6a9b59b55bf91c50fe7b52186 (diff)
downloadlinux-e1405ca5ebf1068a0d62afd2fec8f0354038147a.tar.gz
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/acpi/acpica/utxferror.c')
-rw-r--r--drivers/acpi/acpica/utxferror.c51
1 files changed, 47 insertions, 4 deletions
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;
 #define ACPI_MSG_EXCEPTION      "ACPI Exception: "
 #define ACPI_MSG_WARNING        "ACPI Warning: "
 #define ACPI_MSG_INFO           "ACPI: "
-#define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Bug: Error: "
-#define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Bug: Warning: "
+#define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
+#define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
 /*
  * Common message suffix
  */
@@ -325,7 +325,7 @@ acpi_ut_predefined_warning(const char *module_name,
 		return;
 	}
 
-	acpi_os_printf(ACPI_MSG_WARNING "For %s: ", pathname);
+	acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname);
 
 	va_start(arg_list, format);
 	acpi_os_vprintf(format, arg_list);
@@ -367,7 +367,50 @@ acpi_ut_predefined_info(const char *module_name,
 		return;
 	}
 
-	acpi_os_printf(ACPI_MSG_INFO "For %s: ", pathname);
+	acpi_os_printf(ACPI_MSG_INFO "%s: ", pathname);
+
+	va_start(arg_list, format);
+	acpi_os_vprintf(format, arg_list);
+	ACPI_MSG_SUFFIX;
+	va_end(arg_list);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_predefined_bios_error
+ *
+ * PARAMETERS:  module_name     - Caller's module name (for error output)
+ *              line_number     - Caller's line number (for error output)
+ *              pathname        - Full pathname to the node
+ *              node_flags      - From Namespace node for the method/object
+ *              format          - Printf format string + additional args
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: BIOS error message for predefined names. Messages
+ *              are only emitted the first time a problem with a particular
+ *              method/object is detected. This prevents a flood of
+ *              messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_predefined_bios_error(const char *module_name,
+			      u32 line_number,
+			      char *pathname,
+			      u8 node_flags, const char *format, ...)
+{
+	va_list arg_list;
+
+	/*
+	 * Warning messages for this method/object will be disabled after the
+	 * first time a validation fails or an object is successfully repaired.
+	 */
+	if (node_flags & ANOBJ_EVALUATED) {
+		return;
+	}
+
+	acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s: ", pathname);
 
 	va_start(arg_list, format);
 	acpi_os_vprintf(format, arg_list);