Merge git://github.com/rustyrussell/linux
[pandora-kernel.git] / arch / arm / mach-omap2 / omap-smp.c
index ce65e93..4412ddb 100644 (file)
@@ -102,19 +102,20 @@ void __init smp_init_cpus(void)
 {
        unsigned int i, ncores;
 
-       /* Never released */
-       scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
+       /*
+        * Currently we can't call ioremap here because
+        * SoC detection won't work until after init_early.
+        */
+       scu_base =  OMAP2_L4_IO_ADDRESS(OMAP44XX_SCU_BASE);
        BUG_ON(!scu_base);
 
        ncores = scu_get_core_count(scu_base);
 
        /* sanity check */
-       if (ncores > NR_CPUS) {
-               printk(KERN_WARNING
-                      "OMAP4: no. of cores (%d) greater than configured "
-                      "maximum of %d - clipping\n",
-                      ncores, NR_CPUS);
-               ncores = NR_CPUS;
+       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++)