All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mce: Fix initialization error warning
@ 2017-01-16 21:49 Prarit Bhargava
  2017-01-16 21:56 ` Thomas Gleixner
  2017-01-16 21:56 ` Borislav Petkov
  0 siblings, 2 replies; 11+ messages in thread
From: Prarit Bhargava @ 2017-01-16 21:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Prarit Bhargava, Tony Luck, Borislav Petkov, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, x86, linux-edac

When booting kernel with mce=off a loud warning from the mce code
is displayed.  This causes confusion for end users.

Add a check to see if MCE is available before outputting the warning
message.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: linux-edac@vger.kernel.org
---
 arch/x86/kernel/cpu/mcheck/mce.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 00ef43233e03..943a0c440c55 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -2662,7 +2662,8 @@ static __init int mcheck_init_device(void)
 	free_cpumask_var(mce_device_initialized);
 
 err_out:
-	pr_err("Unable to init device /dev/mcelog (rc: %d)\n", err);
+	if (mce_available(&boot_cpu_data))
+		pr_err("Unable to init device /dev/mcelog (rc: %d)\n", err);
 
 	return err;
 }
-- 
1.7.9.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-01-17  9:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16 21:49 [PATCH] x86/mce: Fix initialization error warning Prarit Bhargava
2017-01-16 21:56 ` Thomas Gleixner
2017-01-16 21:56 ` Borislav Petkov
2017-01-16 22:06   ` Prarit Bhargava
2017-01-16 22:43     ` Borislav Petkov
2017-01-16 23:13       ` Prarit Bhargava
2017-01-16 23:32         ` Borislav Petkov
2017-01-16 23:50           ` Prarit Bhargava
2017-01-17  8:34           ` Thomas Gleixner
2017-01-17  9:08             ` Borislav Petkov
2017-01-17  9:09               ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.