From 49160b8ef94e660216bf775092258aa54c052035 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Thu, 26 Jun 2014 14:54:51 +0800 Subject: [PATCH] ARM: rockchip: platsmp fix for Cortex-A7 SCUCTLR do not existing in Cortex-A7. --- arch/arm/mach-rockchip/platsmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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++) { -- 2.34.1