From: Borislav Petkov Date: Tue, 25 Oct 2016 09:55:18 +0000 (+0200) Subject: x86/microcode: Collect CPU info on resume X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f709d0c322203e37581f6b7c91f88b4fdeca5a0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git x86/microcode: Collect CPU info on resume We need to reread the CPU's microcode revision after resume because applied microcode gets "forgotten" depending on the sleep state. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20161025095522.11964-9-bp@alien8.de Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index a18ff7547fa9..f737039d59b2 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -498,6 +498,9 @@ static enum ucode_state microcode_update_cpu(int cpu) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu; + /* Refresh CPU microcode revision after resume. */ + collect_cpu_info(cpu); + if (uci->valid) return microcode_resume_cpu(cpu);