Skip to contentSkip to conversation

:x86_64: Change assembly to use regular cpuid_count macro

PATCH Applied Rohit Seth 2 participants 2 messages May 24, 2006 – May 25, 2006

lore
Share & tools
lore

Rohit Seth

author
#0 lore raw

PATCH 1/1 :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).

arch/x86_64/kernel/setup.c | 7 ++-----

1 files changed, 2 insertions(+), 5 deletions(-)
arch/x86_64/kernel/setup.c +2 -5
@@ -1024,15 +1024,12 @@
  */
 static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
 {
-	unsigned int eax;
+	unsigned int eax, t;
 
 	if (c->cpuid_level < 4)
 		return 1;
 
-	__asm__("cpuid"
-		: "=a" (eax)
-		: "0" (4), "c" (0)
-		: "bx", "dx");
+	cpuid_count(4, 0, &eax, &t, &t, &t);
 
 	if (eax & 0x1f)
 		return ((eax >> 26) + 1);
Applied
#1 lore raw
Quoted 4 lines · Rohit Seth

Minor cleanup patch:

Replacing the asm statement with cpuid_count macro(which already provides the same functionality).

Applied. Thanks.
-Andi