From: Greg Kroah-Hartman Date: Tue, 17 Jul 2018 15:51:06 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.17.8~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8cb4a3607add1676111c6fa42f00e1fac5bef099;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch --- diff --git a/queue-4.4/series b/queue-4.4/series index 9dce20da67d..625c7a6e986 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1 +1,2 @@ kbuild-fix-escaping-in-.cmd-files-for-future-make.patch +x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch diff --git a/queue-4.4/x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch b/queue-4.4/x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch new file mode 100644 index 00000000000..c4a521e673c --- /dev/null +++ b/queue-4.4/x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch @@ -0,0 +1,45 @@ +From 3df8d9208569ef0b2313e516566222d745f3b94b Mon Sep 17 00:00:00 2001 +From: Andy Lutomirski +Date: Thu, 15 Dec 2016 10:14:42 -0800 +Subject: x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 + +From: Andy Lutomirski + +commit 3df8d9208569ef0b2313e516566222d745f3b94b upstream. + +A typo (or mis-merge?) resulted in leaf 6 only being probed if +cpuid_level >= 7. + +Fixes: 2ccd71f1b278 ("x86/cpufeature: Move some of the scattered feature bits to x86_capability") +Signed-off-by: Andy Lutomirski +Acked-by: Borislav Petkov +Cc: Brian Gerst +Link: http://lkml.kernel.org/r/6ea30c0e9daec21e488b54761881a6dfcf3e04d0.1481825597.git.luto@kernel.org +Signed-off-by: Thomas Gleixner +Cc: Brad Spengler +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/cpu/common.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/arch/x86/kernel/cpu/common.c ++++ b/arch/x86/kernel/cpu/common.c +@@ -686,13 +686,14 @@ void get_cpu_cap(struct cpuinfo_x86 *c) + c->x86_capability[CPUID_1_EDX] = edx; + } + ++ /* Thermal and Power Management Leaf: level 0x00000006 (eax) */ ++ if (c->cpuid_level >= 0x00000006) ++ c->x86_capability[CPUID_6_EAX] = cpuid_eax(0x00000006); ++ + /* Additional Intel-defined flags: level 0x00000007 */ + if (c->cpuid_level >= 0x00000007) { + cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx); +- + c->x86_capability[CPUID_7_0_EBX] = ebx; +- +- c->x86_capability[CPUID_6_EAX] = cpuid_eax(0x00000006); + c->x86_capability[CPUID_7_ECX] = ecx; + } +