|
@@ -453,24 +453,6 @@ static void srat_detect_node(struct cpuinfo_x86 *c)
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * find out the number of processor cores on the die
|
|
|
- */
|
|
|
-static int intel_num_cpu_cores(struct cpuinfo_x86 *c)
|
|
|
-{
|
|
|
- unsigned int eax, ebx, ecx, edx;
|
|
|
-
|
|
|
- if (!IS_ENABLED(CONFIG_SMP) || c->cpuid_level < 4)
|
|
|
- return 1;
|
|
|
-
|
|
|
- /* Intel has a non-standard dependency on %ecx for this CPUID level. */
|
|
|
- cpuid_count(4, 0, &eax, &ebx, &ecx, &edx);
|
|
|
- if (eax & 0x1f)
|
|
|
- return (eax >> 26) + 1;
|
|
|
- else
|
|
|
- return 1;
|
|
|
-}
|
|
|
-
|
|
|
static void detect_vmx_virtcap(struct cpuinfo_x86 *c)
|
|
|
{
|
|
|
/* Intel VMX MSR indicated features */
|
|
@@ -671,7 +653,7 @@ static void init_intel(struct cpuinfo_x86 *c)
|
|
|
* let's use the legacy cpuid vector 0x1 and 0x4 for topology
|
|
|
* detection.
|
|
|
*/
|
|
|
- c->x86_max_cores = intel_num_cpu_cores(c);
|
|
|
+ c->x86_max_cores = detect_num_cpu_cores(c);
|
|
|
#ifdef CONFIG_X86_32
|
|
|
detect_ht(c);
|
|
|
#endif
|