diff options
author | Fenghua Yu <fenghua.yu@intel.com> | 2011-05-17 12:33:26 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-03 10:33:37 +0900 |
commit | 09ea34e414df2d89f1eb7877c6f678729bdef67e (patch) | |
tree | 58acbd7b3251c944ab1f6b62b123626f3e40aa7d /arch | |
parent | ce19c2986d069294f5409430746069102603aa82 (diff) | |
download | lwn-09ea34e414df2d89f1eb7877c6f678729bdef67e.tar.gz lwn-09ea34e414df2d89f1eb7877c6f678729bdef67e.zip |
x86, cpufeature: Fix cpuid leaf 7 feature detection
commit 2494b030ba9334c7dd7df9b9f7abe4eacc950ec5 upstream.
CPUID leaf 7, subleaf 0 returns the maximum subleaf in EAX, not the
number of subleaves. Since so far only subleaf 0 is defined (and only
the EBX bitfield) we do not need to qualify the test.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1305660806-17519-1-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 1d59834396bd..a9c7d7d7733a 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -565,8 +565,7 @@ void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c) cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx); - if (eax > 0) - c->x86_capability[9] = ebx; + c->x86_capability[9] = ebx; } /* AMD-defined flags: level 0x80000001 */ |