From: 黄涛 Date: Thu, 26 Jun 2014 06:54:51 +0000 (+0800) Subject: ARM: rockchip: platsmp fix for Cortex-A7 X-Git-Tag: firefly_0821_release~4916^2~319 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=49160b8ef94e660216bf775092258aa54c052035;p=firefly-linux-kernel-4.4.55.git ARM: rockchip: platsmp fix for Cortex-A7 SCUCTLR do not existing in Cortex-A7. --- diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index db66d50bcadc..e567c09ebc97 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c @@ -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++) {