|
@@ -1281,11 +1281,10 @@ void __init native_smp_prepare_boot_cpu(void)
|
|
|
cpu_set_state_online(me);
|
|
|
}
|
|
|
|
|
|
-void __init native_smp_cpus_done(unsigned int max_cpus)
|
|
|
+void __init calculate_max_logical_packages(void)
|
|
|
{
|
|
|
int ncpus;
|
|
|
|
|
|
- pr_debug("Boot done\n");
|
|
|
/*
|
|
|
* Today neither Intel nor AMD support heterogenous systems so
|
|
|
* extrapolate the boot cpu's data to all packages.
|
|
@@ -1293,6 +1292,13 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
|
|
|
ncpus = cpu_data(0).booted_cores * topology_max_smt_threads();
|
|
|
__max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus);
|
|
|
pr_info("Max logical packages: %u\n", __max_logical_packages);
|
|
|
+}
|
|
|
+
|
|
|
+void __init native_smp_cpus_done(unsigned int max_cpus)
|
|
|
+{
|
|
|
+ pr_debug("Boot done\n");
|
|
|
+
|
|
|
+ calculate_max_logical_packages();
|
|
|
|
|
|
if (x86_has_numa_in_package)
|
|
|
set_sched_topology(x86_numa_in_package_topology);
|