* Michael S. Tsirkin <m...@redhat.com> wrote: > On Sandy bridge CPUs with old microcode, PEBs > fails and suggests a microcode update. > Print out the required and the actual revision to > make it easier to figure out what's wrong. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > --- > arch/x86/kernel/cpu/perf_event_intel.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/kernel/cpu/perf_event_intel.c > b/arch/x86/kernel/cpu/perf_event_intel.c > index f31a165..81f2789 100644 > --- a/arch/x86/kernel/cpu/perf_event_intel.c > +++ b/arch/x86/kernel/cpu/perf_event_intel.c > @@ -2105,6 +2105,8 @@ static int intel_snb_pebs_broken(int cpu) > } > } > > + pr_info("PEBS checking: microcode 0x%x min legal 0x%x\n", > + cpu_data(cpu).microcode, rev);
That's not a very informative message though. Something like: "x86/perf/intel: PEBS turned off due to too old microcode version 0x%x\n" "x86/perf/intel: Minimum required microcode version for PEBS: 0x%x\n" would work better I think. Also, only output this once, and only output it if the check _fails_. > return (cpu_data(cpu).microcode < rev); Btw., please also fix the return statement, it doesn't need parentheses. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/