From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757302AbcBIN7I (ORCPT ); Tue, 9 Feb 2016 08:59:08 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35986 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756757AbcBIN7B (ORCPT ); Tue, 9 Feb 2016 08:59:01 -0500 Date: Tue, 9 Feb 2016 14:58:57 +0100 From: Ingo Molnar To: Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Thomas Gleixner Subject: Re: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog" message Message-ID: <20160209135857.GB26641@gmail.com> References: <1453755684-10936-1-git-send-email-konrad.wilk@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1453755684-10936-1-git-send-email-konrad.wilk@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Konrad Rzeszutek Wilk wrote: > This code is run unconditionaly on bootup - and if the machine > does not expose the MCE capability this scary message shows up. > > It is not needed as one can get that information from: > > 1) Observing there are no /dev/mcelog > 2) Running with 'initcall_debug' to see what the return code was > -EIO, -ENOMEM, -EBUSY > > CC: Borislav Petkov > Cc: Andy Lutomirski > Cc: H. Peter Anvin > Cc: Thomas Gleixner > CC: Ingo Molnar > Reported-by: Marek Marczykowski-Górecki > Signed-off-by: Konrad Rzeszutek Wilk > --- > arch/x86/kernel/cpu/mcheck/mce.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c > index a006f4c..1c0132f 100644 > --- a/arch/x86/kernel/cpu/mcheck/mce.c > +++ b/arch/x86/kernel/cpu/mcheck/mce.c > @@ -2525,8 +2525,6 @@ err_out_mem: > free_cpumask_var(mce_device_initialized); > > err_out: > - pr_err("Unable to init device /dev/mcelog (rc: %d)\n", err); > - > return err; > } So the message is useful if it was not initialized for some anomalous reason. What we want instead is to handle this case differently: if (!mce_available(&boot_cpu_data)) { err = -EIO; goto err_out; } and not print a warning in that case, i.e. do: if (!mce_available(&boot_cpu_data)) return -EIO; Thanks, Ingo