Use correct microcode resume fix
This commit is contained in:
parent
8750f79ddb
commit
aea080f193
11
PKGBUILD
11
PKGBUILD
|
@ -5,7 +5,7 @@ pkgbase=linux # Build stock -ARCH kernel
|
|||
#pkgbase=linux-custom # Build kernel with a different name
|
||||
_srcname=linux-3.17
|
||||
pkgver=3.17.4
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
|
@ -26,7 +26,7 @@ sha256sums=('f5153ec93c5fcd41b247950e6a9bcbc63fa87beafd112c133a622439a0f76251'
|
|||
'66fc95823d3c99167532f37c07e9582d305961103997fcc61cfc7f6a86b34130'
|
||||
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
|
||||
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
|
||||
'43668fe46147fe93f41b919db673574427ce5a8c376cd28ddddcbf3a00326491')
|
||||
'4eb64c2520e9bcdff47d757946011b4bf9896186d285361f18364c7ff9b2c699')
|
||||
|
||||
_kernelname=${pkgbase#linux}
|
||||
|
||||
|
@ -296,10 +296,3 @@ for _p in ${pkgname[@]}; do
|
|||
done
|
||||
|
||||
# vim:set ts=8 sts=2 sw=2 et:
|
||||
sha256sums=('f5153ec93c5fcd41b247950e6a9bcbc63fa87beafd112c133a622439a0f76251'
|
||||
'eeef37397a15245bd143569908be40622a87dc7673965e623e811ea3f68b8434'
|
||||
'ea9de72fe335055f6e8eebd1d85cad150a47a81004bb27d78f18f2591fd3bbd5'
|
||||
'66fc95823d3c99167532f37c07e9582d305961103997fcc61cfc7f6a86b34130'
|
||||
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
|
||||
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
|
||||
'43668fe46147fe93f41b919db673574427ce5a8c376cd28ddddcbf3a00326491')
|
||||
|
|
|
@ -1,21 +1,46 @@
|
|||
From fb86b97300d930b57471068720c52bfa8622eab7 Mon Sep 17 00:00:00 2001
|
||||
From: Borislav Petkov <bp@suse.de>
|
||||
Date: Tue, 18 Nov 2014 10:46:57 +0100
|
||||
Subject: [PATCH] x86, microcode: Update BSPs microcode on resume
|
||||
|
||||
In the situation when we apply early microcode but do *not* apply late
|
||||
microcode, we fail to update the BSP's microcode on resume because we
|
||||
haven't initialized the uci->mc microcode pointer. So, in order to
|
||||
alleviate that, we go and dig out the stashed microcode patch during
|
||||
early boot. It is basically the same thing that is done on the APs early
|
||||
during boot so do that too here.
|
||||
|
||||
Tested-by: alex.schnaidt@gmail.com
|
||||
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=88001
|
||||
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
|
||||
Cc: Fenghua Yu <fenghua.yu@intel.com>
|
||||
Cc: <stable@vger.kernel.org> # v3.9
|
||||
Signed-off-by: Borislav Petkov <bp@suse.de>
|
||||
Link: http://lkml.kernel.org/r/20141118094657.GA6635@pd.tnic
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
arch/x86/kernel/cpu/microcode/core.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
|
||||
index dd9d6190b08d..181e42bd85d3 100644
|
||||
index dd9d619..2ce9051 100644
|
||||
--- a/arch/x86/kernel/cpu/microcode/core.c
|
||||
+++ b/arch/x86/kernel/cpu/microcode/core.c
|
||||
@@ -85,6 +85,7 @@
|
||||
#include <linux/syscore_ops.h>
|
||||
|
||||
#include <asm/microcode.h>
|
||||
+#include <asm/microcode_intel.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/perf_event.h>
|
||||
@@ -465,6 +466,8 @@ static void mc_bp_resume(void)
|
||||
@@ -465,6 +465,14 @@ static void mc_bp_resume(void)
|
||||
|
||||
if (uci->valid && uci->mc)
|
||||
microcode_ops->apply_microcode(cpu);
|
||||
+ else if (!uci->mc)
|
||||
+ load_ucode_intel_ap();
|
||||
+ /*
|
||||
+ * We might resume and not have applied late microcode but still
|
||||
+ * have a newer patch stashed from the early loader. We don't
|
||||
+ * have it in uci->mc so we have to load it the same way we're
|
||||
+ * applying patches early on the APs.
|
||||
+ */
|
||||
+ load_ucode_ap();
|
||||
}
|
||||
|
||||
static struct syscore_ops mc_syscore_ops = {
|
||||
--
|
||||
2.1.3
|
||||
|
||||
|
|
Loading…
Reference in New Issue