x86/microcode/intel: Do not issue microcode updates messages on each CPU
On large systems the microcode driver is very noisy, because it prints a line for each CPU. The lines are redundant because usually all CPUs are updated to the same microcode revision. All other subsystems have been patched previously to not print a line for each CPU. Only the microcode driver is left. Only print an microcode revision update when something changed. This results in typically only a single line being printed. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: elliott@hpe.com Cc: hmh@hmh.eng.br Link: http://lkml.kernel.org/r/20160609134141.5981-1-andi@firstfloor.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -843,6 +843,7 @@ void reload_ucode_intel(void)
|
|||||||
|
|
||||||
static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
|
static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
|
||||||
{
|
{
|
||||||
|
static struct cpu_signature prev;
|
||||||
struct cpuinfo_x86 *c = &cpu_data(cpu_num);
|
struct cpuinfo_x86 *c = &cpu_data(cpu_num);
|
||||||
unsigned int val[2];
|
unsigned int val[2];
|
||||||
|
|
||||||
@@ -857,8 +858,13 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
csig->rev = c->microcode;
|
csig->rev = c->microcode;
|
||||||
pr_info("CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n",
|
|
||||||
cpu_num, csig->sig, csig->pf, csig->rev);
|
/* No extra locking on prev, races are harmless. */
|
||||||
|
if (csig->sig != prev.sig || csig->pf != prev.pf || csig->rev != prev.rev) {
|
||||||
|
pr_info("sig=0x%x, pf=0x%x, revision=0x%x\n",
|
||||||
|
csig->sig, csig->pf, csig->rev);
|
||||||
|
prev = *csig;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -887,6 +893,7 @@ static int apply_microcode_intel(int cpu)
|
|||||||
struct ucode_cpu_info *uci;
|
struct ucode_cpu_info *uci;
|
||||||
struct cpuinfo_x86 *c;
|
struct cpuinfo_x86 *c;
|
||||||
unsigned int val[2];
|
unsigned int val[2];
|
||||||
|
static int prev_rev;
|
||||||
|
|
||||||
/* We should bind the task to the CPU */
|
/* We should bind the task to the CPU */
|
||||||
if (WARN_ON(raw_smp_processor_id() != cpu))
|
if (WARN_ON(raw_smp_processor_id() != cpu))
|
||||||
@@ -921,11 +928,14 @@ static int apply_microcode_intel(int cpu)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_info("CPU%d updated to revision 0x%x, date = %04x-%02x-%02x\n",
|
if (val[1] != prev_rev) {
|
||||||
cpu, val[1],
|
pr_info("updated to revision 0x%x, date = %04x-%02x-%02x\n",
|
||||||
|
val[1],
|
||||||
mc->hdr.date & 0xffff,
|
mc->hdr.date & 0xffff,
|
||||||
mc->hdr.date >> 24,
|
mc->hdr.date >> 24,
|
||||||
(mc->hdr.date >> 16) & 0xff);
|
(mc->hdr.date >> 16) & 0xff);
|
||||||
|
prev_rev = val[1];
|
||||||
|
}
|
||||||
|
|
||||||
c = &cpu_data(cpu);
|
c = &cpu_data(cpu);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user