The following commit has been merged into the x86/microcode branch of tip:

Commit-ID:     811ae8ba6dca6b91a3ceccf9d40b98818cc4f400
Gitweb:        
https://git.kernel.org/tip/811ae8ba6dca6b91a3ceccf9d40b98818cc4f400
Author:        Borislav Petkov <b...@suse.de>
AuthorDate:    Sat, 24 Aug 2019 10:01:53 +02:00
Committer:     Borislav Petkov <b...@suse.de>
CommitterDate: Tue, 01 Oct 2019 16:06:35 +02:00

x86/microcode/intel: Issue the revision updated message only on the BSP

... in order to not pollute dmesg with a line for each updated microcode
engine.

Signed-off-by: Borislav Petkov <b...@suse.de>
Cc: Ashok Raj <ashok....@intel.com>
Cc: Boris Ostrovsky <boris.ostrov...@oracle.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Jon Grimm <jon.gr...@amd.com>
Cc: kanth.ghatr...@oracle.com
Cc: konrad.w...@oracle.com
Cc: Mihai Carabas <mihai.cara...@oracle.com>
Cc: patrick.c...@oracle.com
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Tom Lendacky <thomas.lenda...@amd.com>
Cc: x86-ml <x...@kernel.org>
Link: https://lkml.kernel.org/r/20190824085341.gc16...@zn.tnic
---
 arch/x86/kernel/cpu/microcode/intel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c 
b/arch/x86/kernel/cpu/microcode/intel.c
index ce799cf..6a99535 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -791,6 +791,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
 {
        struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
        struct cpuinfo_x86 *c = &cpu_data(cpu);
+       bool bsp = c->cpu_index == boot_cpu_data.cpu_index;
        struct microcode_intel *mc;
        enum ucode_state ret;
        static int prev_rev;
@@ -836,7 +837,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
                return UCODE_ERROR;
        }
 
-       if (rev != prev_rev) {
+       if (bsp && rev != prev_rev) {
                pr_info("updated to revision 0x%x, date = %04x-%02x-%02x\n",
                        rev,
                        mc->hdr.date & 0xffff,
@@ -852,7 +853,7 @@ out:
        c->microcode     = rev;
 
        /* Update boot_cpu_data's revision too, if we're on the BSP: */
-       if (c->cpu_index == boot_cpu_data.cpu_index)
+       if (bsp)
                boot_cpu_data.microcode = rev;
 
        return ret;

Reply via email to