File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ void notify_cpu_starting(unsigned int cpu);
94
94
extern void cpu_maps_update_begin (void );
95
95
extern void cpu_maps_update_done (void );
96
96
int bringup_hibernate_cpu (unsigned int sleep_cpu );
97
+ void bringup_nonboot_cpus (unsigned int setup_max_cpus );
97
98
98
99
#else /* CONFIG_SMP */
99
100
#define cpuhp_tasks_frozen 0
Original file line number Diff line number Diff line change @@ -1298,6 +1298,18 @@ int bringup_hibernate_cpu(unsigned int sleep_cpu)
1298
1298
return 0 ;
1299
1299
}
1300
1300
1301
+ void bringup_nonboot_cpus (unsigned int setup_max_cpus )
1302
+ {
1303
+ unsigned int cpu ;
1304
+
1305
+ for_each_present_cpu (cpu ) {
1306
+ if (num_online_cpus () >= setup_max_cpus )
1307
+ break ;
1308
+ if (!cpu_online (cpu ))
1309
+ cpu_up (cpu );
1310
+ }
1311
+ }
1312
+
1301
1313
#ifdef CONFIG_PM_SLEEP_SMP
1302
1314
static cpumask_var_t frozen_cpus ;
1303
1315
Original file line number Diff line number Diff line change @@ -597,20 +597,13 @@ void __init setup_nr_cpu_ids(void)
597
597
void __init smp_init (void )
598
598
{
599
599
int num_nodes , num_cpus ;
600
- unsigned int cpu ;
601
600
602
601
idle_threads_init ();
603
602
cpuhp_threads_init ();
604
603
605
604
pr_info ("Bringing up secondary CPUs ...\n" );
606
605
607
- /* FIXME: This should be done in userspace --RR */
608
- for_each_present_cpu (cpu ) {
609
- if (num_online_cpus () >= setup_max_cpus )
610
- break ;
611
- if (!cpu_online (cpu ))
612
- cpu_up (cpu );
613
- }
606
+ bringup_nonboot_cpus (setup_max_cpus );
614
607
615
608
num_nodes = num_online_nodes ();
616
609
num_cpus = num_online_cpus ();
You can’t perform that action at this time.
0 commit comments