mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6
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 <luto@kernel.org> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Link: http://lkml.kernel.org/r/6ea30c0e9daec21e488b54761881a6dfcf3e04d0.1481825597.git.luto@kernel.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
7ebb916782
commit
3df8d92085
@ -667,13 +667,14 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
|
|||||||
c->x86_capability[CPUID_1_EDX] = edx;
|
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 */
|
/* Additional Intel-defined flags: level 0x00000007 */
|
||||||
if (c->cpuid_level >= 0x00000007) {
|
if (c->cpuid_level >= 0x00000007) {
|
||||||
cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx);
|
cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
c->x86_capability[CPUID_7_0_EBX] = ebx;
|
c->x86_capability[CPUID_7_0_EBX] = ebx;
|
||||||
|
|
||||||
c->x86_capability[CPUID_6_EAX] = cpuid_eax(0x00000006);
|
|
||||||
c->x86_capability[CPUID_7_ECX] = ecx;
|
c->x86_capability[CPUID_7_ECX] = ecx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user