From: Ingo Molnar <mingo@kernel.org>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-kernel@vger.kernel.org, Borislav Petkov <bp@suse.de>,
Andy Lutomirski <luto@amacapital.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog" message
Date: Tue, 9 Feb 2016 14:58:57 +0100 [thread overview]
Message-ID: <20160209135857.GB26641@gmail.com> (raw)
In-Reply-To: <1453755684-10936-1-git-send-email-konrad.wilk@oracle.com>
* Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> 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 <bp@suse.de>
> Cc: Andy Lutomirski <luto@amacapital.net>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> CC: Ingo Molnar <mingo@kernel.org>
> Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> 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
parent reply other threads:[~2016-02-09 13:59 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1453755684-10936-1-git-send-email-konrad.wilk@oracle.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160209135857.GB26641@gmail.com \
--to=mingo@kernel.org \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.