ARM: rockchip: platsmp fix for Cortex-A7
author黄涛 <huangtao@rock-chips.com>
Thu, 26 Jun 2014 06:54:51 +0000 (14:54 +0800)
committer黄涛 <huangtao@rock-chips.com>
Thu, 26 Jun 2014 06:54:51 +0000 (14:54 +0800)
SCUCTLR do not existing in Cortex-A7.

arch/arm/mach-rockchip/platsmp.c

index db66d50bcadcbeeb5d36728fef1297d5e81249d4..e567c09ebc978db4bac26e2df867108efecd9303 100644 (file)
@@ -148,13 +148,13 @@ static void __init rockchip_a9_smp_prepare_cpus(unsigned int max_cpus)
 static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned int i, cpu;
-       unsigned long scuctlr;
+       unsigned long l2ctlr;
 
        if (scu_a9_has_base())
                return rockchip_a9_smp_prepare_cpus(max_cpus);
 
-       asm("mrc p15, 1, %0, c9, c0, 4" : "=r" (scuctlr));
-       ncores = (scuctlr & 3) + 1;
+       asm("mrc p15, 1, %0, c9, c0, 2" : "=r" (l2ctlr));
+       ncores = ((l2ctlr >> 24) & 3) + 1;
        cpu = MPIDR_AFFINITY_LEVEL(read_cpuid_mpidr(), 0);
        /* Make sure that all cores except myself are really off */
        for (i = 0; i < ncores; i++) {