File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
129
129
void cpu_disable_common (void );
130
130
void native_smp_prepare_boot_cpu (void );
131
131
void native_smp_prepare_cpus (unsigned int max_cpus );
132
+ void calculate_max_logical_packages (void );
132
133
void native_smp_cpus_done (unsigned int max_cpus );
133
134
void common_cpu_up (unsigned int cpunum , struct task_struct * tidle );
134
135
int native_cpu_up (unsigned int cpunum , struct task_struct * tidle );
Original file line number Diff line number Diff line change @@ -1281,18 +1281,24 @@ void __init native_smp_prepare_boot_cpu(void)
1281
1281
cpu_set_state_online (me );
1282
1282
}
1283
1283
1284
- void __init native_smp_cpus_done ( unsigned int max_cpus )
1284
+ void __init calculate_max_logical_packages ( void )
1285
1285
{
1286
1286
int ncpus ;
1287
1287
1288
- pr_debug ("Boot done\n" );
1289
1288
/*
1290
1289
* Today neither Intel nor AMD support heterogenous systems so
1291
1290
* extrapolate the boot cpu's data to all packages.
1292
1291
*/
1293
1292
ncpus = cpu_data (0 ).booted_cores * topology_max_smt_threads ();
1294
1293
__max_logical_packages = DIV_ROUND_UP (nr_cpu_ids , ncpus );
1295
1294
pr_info ("Max logical packages: %u\n" , __max_logical_packages );
1295
+ }
1296
+
1297
+ void __init native_smp_cpus_done (unsigned int max_cpus )
1298
+ {
1299
+ pr_debug ("Boot done\n" );
1300
+
1301
+ calculate_max_logical_packages ();
1296
1302
1297
1303
if (x86_has_numa_in_package )
1298
1304
set_sched_topology (x86_numa_in_package_topology );
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ void __init xen_smp_cpus_done(unsigned int max_cpus)
122
122
123
123
if (xen_hvm_domain ())
124
124
native_smp_cpus_done (max_cpus );
125
+ else
126
+ calculate_max_logical_packages ();
125
127
126
128
if (xen_have_vcpu_info_placement )
127
129
return ;
You can’t perform that action at this time.
0 commit comments