x86: mce: don't print "human readable" message for corrected errors
The "human readable" message is not useful for corrected
errors. There's no reason to run mcelog --ascii and the
error is logged anyways. And it's pr_emerg, which is not
needed for a corrected error.
Only print it during panic.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index ecaf0f6..a63e956 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -104,11 +104,15 @@
ATOMIC_NOTIFIER_HEAD(x86_mce_decoder_chain);
EXPORT_SYMBOL_GPL(x86_mce_decoder_chain);
+#define CORRECTED 1
+
static int default_decode_mce(struct notifier_block *nb, unsigned long val,
void *data)
{
- pr_emerg(HW_ERR "No human readable MCE decoding support on this CPU type.\n");
- pr_emerg(HW_ERR "Run the message through 'mcelog --ascii' to decode.\n");
+ if (val != CORRECTED) {
+ pr_emerg(HW_ERR "No human readable MCE decoding support on this CPU type.\n");
+ pr_emerg(HW_ERR "Run the message through 'mcelog --ascii' to decode.\n");
+ }
return NOTIFY_STOP;
}
@@ -596,7 +600,8 @@
*/
if (!(flags & MCP_DONTLOG) && !mce_dont_log_ce) {
mce_log(&m);
- atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, &m);
+ atomic_notifier_call_chain(&x86_mce_decoder_chain,
+ CORRECTED, &m);
add_taint(TAINT_MACHINE_CHECK);
}