diff options
| author | Andi Kleen <ak@linux.intel.com> | 2016-06-09 09:41:41 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-06-14 04:51:43 -0400 |
| commit | 354542d034ab2a849a284edcc661e76b753a57dc (patch) | |
| tree | d43a265f0631e6a423b9228646776201929f1d5e /arch/x86/kernel/cpu/microcode | |
| parent | 9f3cc2a0772d7744d1d7195d39ac4794af622fe6 (diff) | |
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>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode')
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/intel.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 8962d6acee39..6515c802346a 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c | |||
| @@ -843,6 +843,7 @@ void reload_ucode_intel(void) | |||
| 843 | 843 | ||
| 844 | static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) | 844 | static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) |
| 845 | { | 845 | { |
| 846 | static struct cpu_signature prev; | ||
| 846 | struct cpuinfo_x86 *c = &cpu_data(cpu_num); | 847 | struct cpuinfo_x86 *c = &cpu_data(cpu_num); |
| 847 | unsigned int val[2]; | 848 | unsigned int val[2]; |
| 848 | 849 | ||
| @@ -857,8 +858,13 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) | |||
| 857 | } | 858 | } |
| 858 | 859 | ||
| 859 | csig->rev = c->microcode; | 860 | csig->rev = c->microcode; |
| 860 | pr_info("CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n", | 861 | |
| 861 | cpu_num, csig->sig, csig->pf, csig->rev); | 862 | /* No extra locking on prev, races are harmless. */ |
| 863 | if (csig->sig != prev.sig || csig->pf != prev.pf || csig->rev != prev.rev) { | ||
| 864 | pr_info("sig=0x%x, pf=0x%x, revision=0x%x\n", | ||
| 865 | csig->sig, csig->pf, csig->rev); | ||
| 866 | prev = *csig; | ||
| 867 | } | ||
| 862 | 868 | ||
| 863 | return 0; | 869 | return 0; |
| 864 | } | 870 | } |
| @@ -887,6 +893,7 @@ static int apply_microcode_intel(int cpu) | |||
| 887 | struct ucode_cpu_info *uci; | 893 | struct ucode_cpu_info *uci; |
| 888 | struct cpuinfo_x86 *c; | 894 | struct cpuinfo_x86 *c; |
| 889 | unsigned int val[2]; | 895 | unsigned int val[2]; |
| 896 | static int prev_rev; | ||
| 890 | 897 | ||
| 891 | /* We should bind the task to the CPU */ | 898 | /* We should bind the task to the CPU */ |
| 892 | if (WARN_ON(raw_smp_processor_id() != cpu)) | 899 | if (WARN_ON(raw_smp_processor_id() != cpu)) |
| @@ -921,11 +928,14 @@ static int apply_microcode_intel(int cpu) | |||
| 921 | return -1; | 928 | return -1; |
| 922 | } | 929 | } |
| 923 | 930 | ||
| 924 | pr_info("CPU%d updated to revision 0x%x, date = %04x-%02x-%02x\n", | 931 | if (val[1] != prev_rev) { |
| 925 | cpu, val[1], | 932 | pr_info("updated to revision 0x%x, date = %04x-%02x-%02x\n", |
| 926 | mc->hdr.date & 0xffff, | 933 | val[1], |
| 927 | mc->hdr.date >> 24, | 934 | mc->hdr.date & 0xffff, |
| 928 | (mc->hdr.date >> 16) & 0xff); | 935 | mc->hdr.date >> 24, |
| 936 | (mc->hdr.date >> 16) & 0xff); | ||
| 937 | prev_rev = val[1]; | ||
| 938 | } | ||
| 929 | 939 | ||
| 930 | c = &cpu_data(cpu); | 940 | c = &cpu_data(cpu); |
| 931 | 941 | ||
