diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2023-10-02 13:59:49 +0200 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-10-24 15:05:54 +0200 |
commit | 11f96ac4c21e701650c7d8349b252973185ac6ce (patch) | |
tree | 4477607d9c046277c4327c417d69e23b9bc7fc0c /arch/x86 | |
parent | 164aa1ca537238c46923ccacd8995b4265aee47b (diff) | |
download | linux-11f96ac4c21e701650c7d8349b252973185ac6ce.tar.gz linux-11f96ac4c21e701650c7d8349b252973185ac6ce.tar.bz2 linux-11f96ac4c21e701650c7d8349b252973185ac6ce.zip |
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
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/microcode/intel.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 5aa7f5efc440..47a96c0ef65f 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -435,21 +435,7 @@ void reload_ucode_intel(void) static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) { - struct cpuinfo_x86 *c = &cpu_data(cpu_num); - 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; - + intel_collect_cpu_info(csig); return 0; } |