diff options
Diffstat (limited to 'arch/i386/kernel/cpu')
-rw-r--r-- | arch/i386/kernel/cpu/intel.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index a2c33c1a46c5..43601de0f633 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c | |||
@@ -82,16 +82,13 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c) | |||
82 | */ | 82 | */ |
83 | static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) | 83 | static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) |
84 | { | 84 | { |
85 | unsigned int eax; | 85 | unsigned int eax, ebx, ecx, edx; |
86 | 86 | ||
87 | if (c->cpuid_level < 4) | 87 | if (c->cpuid_level < 4) |
88 | return 1; | 88 | return 1; |
89 | 89 | ||
90 | __asm__("cpuid" | 90 | /* Intel has a non-standard dependency on %ecx for this CPUID level. */ |
91 | : "=a" (eax) | 91 | cpuid_count(4, 0, &eax, &ebx, &ecx, &edx); |
92 | : "0" (4), "c" (0) | ||
93 | : "bx", "dx"); | ||
94 | |||
95 | if (eax & 0x1f) | 92 | if (eax & 0x1f) |
96 | return ((eax >> 26) + 1); | 93 | return ((eax >> 26) + 1); |
97 | else | 94 | else |