File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -729,6 +729,25 @@ static void __init resource_init(void)
729729 }
730730}
731731
732+ #ifdef CONFIG_SMP
733+ static void __init prefill_possible_map (void )
734+ {
735+ int i , possible = num_possible_cpus ();
736+
737+ if (possible > nr_cpu_ids )
738+ possible = nr_cpu_ids ;
739+
740+ for (i = 0 ; i < possible ; i ++ )
741+ set_cpu_possible (i , true);
742+ for (; i < NR_CPUS ; i ++ )
743+ set_cpu_possible (i , false);
744+
745+ nr_cpu_ids = possible ;
746+ }
747+ #else
748+ static inline void prefill_possible_map (void ) {}
749+ #endif
750+
732751void __init setup_arch (char * * cmdline_p )
733752{
734753 cpu_probe ();
@@ -752,6 +771,7 @@ void __init setup_arch(char **cmdline_p)
752771
753772 resource_init ();
754773 plat_smp_setup ();
774+ prefill_possible_map ();
755775
756776 cpu_cache_init ();
757777}
You can’t perform that action at this time.
0 commit comments