Skip to contentSkip to conversation

Patch "x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 9, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch

and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 3df8d9208569ef0b2313e516566222d745f3b94b Mon Sep 17 00:00:00 2001

From: Andy Lutomirski <[email protected]>
Date: Thu, 15 Dec 2016 10:14:42 -0800
Subject: x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6

From: Andy Lutomirski <[email protected]>

commit 3df8d9208569ef0b2313e516566222d745f3b94b upstream.

A typo (or mis-merge?) resulted in leaf 6 only being probed if cpuid_level >= 7.

---
 arch/x86/kernel/cpu/common.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/common.c +4 -3
@@ -667,13 +667,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;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/x86-cpu-probe-cpuid-leaf-6-even-when-cpuid_level-6.patch queue-4.9/x86-prctl-uapi-remove-ifdef-for-checkpoint_restore.patch