Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1542961
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 |
| Date | 2016-12-15 19:20 +0100 |
| Message-ID | <sOINk-G7-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
I don't know what CPUs, if any, are affected, and the bug is minor anyway,
so the major advantage of applying this is to remove a head-scratcher when
reading the code, I think.
arch/x86/kernel/cpu/common.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index cc9e980c68ec..d61722821b7b 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -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;
}
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 Andy Lutomirski <luto@kernel.org> - 2016-12-15 19:20 +0100
Re: [PATCH] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 Borislav Petkov <bp@alien8.de> - 2016-12-15 20:20 +0100
[tip:x86/urgent] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2016-12-19 12:00 +0100
Re: [tip:x86/urgent] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 "H. Peter Anvin" <hpa@zytor.com> - 2016-12-20 08:10 +0100
Re: [tip:x86/urgent] x86/cpu: Probe CPUID leaf 6 even when cpuid_level == 6 Thomas Gleixner <tglx@linutronix.de> - 2016-12-20 10:40 +0100
csiph-web