Skip to content

Commit 11f96ac

Browse files
KAGA-KOKObp3tk0v
authored andcommitted
x86/microcode/intel: Reuse intel_cpu_collect_info()
No point for an almost duplicate function. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20231002115902.741173606@linutronix.de
1 parent 164aa1c commit 11f96ac

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

  • arch/x86/kernel/cpu/microcode

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -435,21 +435,7 @@ void reload_ucode_intel(void)
435435

436436
static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
437437
{
438-
struct cpuinfo_x86 *c = &cpu_data(cpu_num);
439-
unsigned int val[2];
440-
441-
memset(csig, 0, sizeof(*csig));
442-
443-
csig->sig = cpuid_eax(0x00000001);
444-
445-
if ((c->x86_model >= 5) || (c->x86 > 6)) {
446-
/* get processor flags from MSR 0x17 */
447-
rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]);
448-
csig->pf = 1 << ((val[1] >> 18) & 7);
449-
}
450-
451-
csig->rev = c->microcode;
452-
438+
intel_collect_cpu_info(csig);
453439
return 0;
454440
}
455441

0 commit comments

Comments
 (0)