diff options
author | Rohit Seth <rohitseth@google.com> | 2006-06-26 07:58:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:18 -0400 |
commit | 2bbc419f9d51b44f3fdeea12c5b786bdace82b8e (patch) | |
tree | b7b3bbea8a92aaabd35571f1bdf7ca601626fe90 | |
parent | 46d13a384bc695ec61458e5dcbac1eee6d623a9b (diff) |
[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: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/x86_64/kernel/setup.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 816203d57e1..a9de8f02671 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -957,15 +957,12 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
957 | */ | 957 | */ |
958 | static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) | 958 | static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) |
959 | { | 959 | { |
960 | unsigned int eax; | 960 | unsigned int eax, t; |
961 | 961 | ||
962 | if (c->cpuid_level < 4) | 962 | if (c->cpuid_level < 4) |
963 | return 1; | 963 | return 1; |
964 | 964 | ||
965 | __asm__("cpuid" | 965 | cpuid_count(4, 0, &eax, &t, &t, &t); |
966 | : "=a" (eax) | ||
967 | : "0" (4), "c" (0) | ||
968 | : "bx", "dx"); | ||
969 | 966 | ||
970 | if (eax & 0x1f) | 967 | if (eax & 0x1f) |
971 | return ((eax >> 26) + 1); | 968 | return ((eax >> 26) + 1); |