diff options
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 6993842e788c..f2085d54c2c8 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -584,18 +584,17 @@ static void get_model_name(struct cpuinfo_x86 *c) *(s + 1) = '\0'; } -int detect_num_cpu_cores(struct cpuinfo_x86 *c) +void detect_num_cpu_cores(struct cpuinfo_x86 *c) { unsigned int eax, ebx, ecx, edx; + c->x86_max_cores = 1; if (!IS_ENABLED(CONFIG_SMP) || c->cpuid_level < 4) - return 1; + return; cpuid_count(4, 0, &eax, &ebx, &ecx, &edx); if (eax & 0x1f) - return (eax >> 26) + 1; - else - return 1; + c->x86_max_cores = (eax >> 26) + 1; } void cpu_detect_cache_sizes(struct cpuinfo_x86 *c) |