Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1330256 > unrolled thread

Re: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog" message

Started byIngo Molnar <mingo@kernel.org>
First post2016-02-09 15:00 +0100
Last post2016-02-09 15:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog"  message Ingo Molnar <mingo@kernel.org> - 2016-02-09 15:00 +0100

#1330256 — Re: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog" message

FromIngo Molnar <mingo@kernel.org>
Date2016-02-09 15:00 +0100
SubjectRe: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog" message
Message-ID<r0gZK-4N6-47@gated-at.bofh.it>
* 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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web