Skip to content

Commit

Permalink
x86, cpufeature: Fix cpuid leaf 7 feature detection
Browse files Browse the repository at this point in the history
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>
Cc: <stable@kernel.org> 2.6.36..39
  • Loading branch information
Fenghua Yu authored and H. Peter Anvin committed May 17, 2011
1 parent 693d92a commit 2494b03
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2494b03

Please sign in to comment.