Re: [PATCH] perf, x86: Disable perf if the BIOS got its grubbypaws on the PMU

From: Robert Richter
Date: Tue Sep 07 2010 - 12:54:07 EST


On 07.09.10 17:15:41, Robert Richter wrote:
> > > > On 9/3/2010 2:13 AM, Peter Zijlstra wrote:
> > > > >+static void print_BIOS_fail(void)
> > > > >+{
> > > > >+ printk(KERN_ERR "\n");
> > > > >+ printk(KERN_ERR "=============================================\n");
> > > > >+ printk(KERN_ERR "It appears the BIOS is actively using the PMU\n");
> > > > >+ printk(KERN_ERR "this avoids Linux from using it, please de- \n");
> > > > >+ printk(KERN_ERR "activate this BIOS feature or request a BIOS \n");
> > > > >+ printk(KERN_ERR "update from your vendor. \n");
> > > > >+ printk(KERN_ERR "=============================================\n");
>
> I would rather prefer this:
>
> BIOS bug, cpu 1, invalid <register=value> ...

I got the note there is already a macro for this in kernel.h:

#define FW_BUG "[Firmware Bug]: "

So, we would have something like:

[Firmware Bug]: cpu 1, invalid <register=value> ...

in dmesg.

-Robert

>
> ... which is a much better information on one line, explains the bug
> and is also better parsable. I intend to implement messages like
> this. So maybe we could find consensus with this or something similar.
>
> A simple grep of dmesg will then give a list of BIOS bugs.
>
> -Robert
>
> --
> Advanced Micro Devices, Inc.
> Operating System Research Center

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/