public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]:x86_64: Change assembly to use regular cpuid_count macro
@ 2006-05-24 22:25 Rohit Seth
  2006-05-25  3:28 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Rohit Seth @ 2006-05-24 22:25 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Linux-kernel, Andrew Morton

Minor cleanup patch:  

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


Signed-off-by: Rohit Seth <rohitseth@google.com>

arch/x86_64/kernel/setup.c |    7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)


--- linux-2.6.17-rc4.org/arch/x86_64/kernel/setup.c	2006-05-24 13:47:11.000000000 -0700
+++ linux-2.6.17-rc4/arch/x86_64/kernel/setup.c	2006-05-24 14:37:25.000000000 -0700
@@ -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);



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-25  3:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-24 22:25 [PATCH]:x86_64: Change assembly to use regular cpuid_count macro Rohit Seth
2006-05-25  3:28 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox