ARM: smp: fix clipping of number of CPUs
[deliverable/linux.git] / arch / arm / mach-shmobile / platsmp.c
index 66f980625a33e1e05fed0d142abd3fc0090d6c4e..e4e485fa2532b56d21a56e53f4b0815d07230274 100644 (file)
@@ -56,6 +56,12 @@ void __init smp_init_cpus(void)
        unsigned int ncores = shmobile_smp_get_core_count();
        unsigned int i;
 
+       if (ncores > nr_cpu_ids) {
+               pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
+                       ncores, nr_cpu_ids);
+               ncores = nr_cpu_ids;
+       }
+
        for (i = 0; i < ncores; i++)
                set_cpu_possible(i, true);
 
This page took 0.0359 seconds and 5 git commands to generate.