Merge branch 'stable/bug-fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / arch / powerpc / kernel / setup-common.c
index 9d4882a..21f30cb 100644 (file)
@@ -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 */