]> Git Repo - linux.git/commitdiff
x86/microcode/intel: Issue the revision updated message only on the BSP
authorBorislav Petkov <[email protected]>
Sat, 24 Aug 2019 08:01:53 +0000 (10:01 +0200)
committerBorislav Petkov <[email protected]>
Tue, 1 Oct 2019 14:06:35 +0000 (16:06 +0200)
... in order to not pollute dmesg with a line for each updated microcode
engine.

Signed-off-by: Borislav Petkov <[email protected]>
Cc: Ashok Raj <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jon Grimm <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Mihai Carabas <[email protected]>
Cc: [email protected]
Cc: Thomas Gleixner <[email protected]>
Cc: Tom Lendacky <[email protected]>
Cc: x86-ml <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/kernel/cpu/microcode/intel.c

index ce799cfe9434ee17dc994bdafabd2e69d67bfd8a..6a99535d7f3794309a89c05d60463bf122724140 100644 (file)
@@ -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;
This page took 0.047396 seconds and 4 git commands to generate.