powerpc: Set nr_cpu_ids early and use it to free PACAs
Without this, "holes" in the CPU numbering can cause us to free too many PACAs Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
f86d6b9b36
commit
c1854e0072
@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void)
|
||||
*/
|
||||
cpu_init_thread_core_maps(nthreads);
|
||||
|
||||
/* Now that possible cpus are set, set nr_cpu_ids for later use */
|
||||
nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
|
||||
|
||||
free_unused_pacas();
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
Reference in New Issue
Block a user