Commit 11f96ac4 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Borislav Petkov (AMD)

x86/microcode/intel: Reuse intel_cpu_collect_info()

No point for an almost duplicate function.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231002115902.741173606@linutronix.de
parent 164aa1ca
...@@ -435,21 +435,7 @@ void reload_ucode_intel(void) ...@@ -435,21 +435,7 @@ void reload_ucode_intel(void)
static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
{ {
struct cpuinfo_x86 *c = &cpu_data(cpu_num); intel_collect_cpu_info(csig);
unsigned int val[2];
memset(csig, 0, sizeof(*csig));
csig->sig = cpuid_eax(0x00000001);
if ((c->x86_model >= 5) || (c->x86 > 6)) {
/* get processor flags from MSR 0x17 */
rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]);
csig->pf = 1 << ((val[1] >> 18) & 7);
}
csig->rev = c->microcode;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment