Commit 2bbc419f authored by Rohit Seth's avatar Rohit Seth Committed by Linus Torvalds

[PATCH] x86_64: Change assembly to use regular cpuid_count macro

Minor cleanup patch:

Replacing the asm statement with cpuid_count macro(which already
provides the same functionality).
Signed-off-by: default avatarRohit Seth <rohitseth@google.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 46d13a38
...@@ -957,15 +957,12 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) ...@@ -957,15 +957,12 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c)
*/ */
static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
{ {
unsigned int eax; unsigned int eax, t;
if (c->cpuid_level < 4) if (c->cpuid_level < 4)
return 1; return 1;
__asm__("cpuid" cpuid_count(4, 0, &eax, &t, &t, &t);
: "=a" (eax)
: "0" (4), "c" (0)
: "bx", "dx");
if (eax & 0x1f) if (eax & 0x1f)
return ((eax >> 26) + 1); return ((eax >> 26) + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment