Skip to content

Commit bddff61

Browse files
suryasaimadhuSomasundaram Krishnasamy
authored andcommitted
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 <[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]> Orabug: 30297345 JIRA: LINUX-1612 Patch has not been committed to any tree yet so (1) there is no SHA1 to reference and (2) commit message will probably change. Signed-off-by: Mihai Carabas <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 01c74b4 commit bddff61

File tree

1 file changed

+3
-2
lines changed
  • arch/x86/kernel/cpu/microcode

1 file changed

+3
-2
lines changed

arch/x86/kernel/cpu/microcode/intel.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
796796
{
797797
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
798798
struct cpuinfo_x86 *c = &cpu_data(cpu);
799+
bool bsp = c->cpu_index == boot_cpu_data.cpu_index;
799800
struct microcode_intel *mc;
800801
enum ucode_state ret;
801802
static int prev_rev;
@@ -841,7 +842,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
841842
return UCODE_ERROR;
842843
}
843844

844-
if (rev != prev_rev) {
845+
if (bsp && rev != prev_rev) {
845846
pr_info("updated to revision 0x%x, date = %04x-%02x-%02x\n",
846847
rev,
847848
mc->hdr.date & 0xffff,
@@ -857,7 +858,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
857858
c->microcode = rev;
858859

859860
/* Update boot_cpu_data's revision too, if we're on the BSP: */
860-
if (c->cpu_index == boot_cpu_data.cpu_index)
861+
if (bsp)
861862
boot_cpu_data.microcode = rev;
862863

863864
/* Whitelist/blacklist speculation control features. */

0 commit comments

Comments
 (0)