public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rohit Seth <rohitseth@google.com>
To: Andi Kleen <ak@suse.de>
Cc: Linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: [PATCH]:x86_64: Change assembly to use regular cpuid_count macro
Date: Wed, 24 May 2006 15:25:22 -0700	[thread overview]
Message-ID: <1148509522.14025.7.camel@galaxy.corp.google.com> (raw)

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);



             reply	other threads:[~2006-05-24 22:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 22:25 Rohit Seth [this message]
2006-05-25  3:28 ` [PATCH]:x86_64: Change assembly to use regular cpuid_count macro Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1148509522.14025.7.camel@galaxy.corp.google.com \
    --to=rohitseth@google.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox