From d3c6ae912ef4ae38d20dd04ffa3942b38288dbd9 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Wed, 13 Feb 2013 00:45:34 +0900 Subject: [PATCH] --- yaml --- r: 370521 b: refs/heads/master c: 2f747dbab424396b797d8abfb5d54c5e19003885 h: refs/heads/master i: 370519: 7bcecb3b1cccf8389daf219fffed5a3b8e7e652e v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-shmobile/smp-emev2.c | 21 ++++++++------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 59f064737bf0..4db6784a8dcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ae56a951de0efbf36a51de5b2e91db10425c771 +refs/heads/master: 2f747dbab424396b797d8abfb5d54c5e19003885 diff --git a/trunk/arch/arm/mach-shmobile/smp-emev2.c b/trunk/arch/arm/mach-shmobile/smp-emev2.c index 64278215adaa..4ede41339a70 100644 --- a/trunk/arch/arm/mach-shmobile/smp-emev2.c +++ b/trunk/arch/arm/mach-shmobile/smp-emev2.c @@ -50,18 +50,6 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) } -static unsigned int __init emev2_get_core_count(void) -{ - if (!scu_base) { - scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); - emev2_clock_init(); /* need ioremapped SMU */ - } - - WARN_ON_ONCE(!scu_base); - - return scu_base ? scu_get_core_count(scu_base) : 1; -} - static void __cpuinit emev2_secondary_init(unsigned int cpu) { gic_secondary_init(0); @@ -93,7 +81,14 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) static void __init emev2_smp_init_cpus(void) { - unsigned int ncores = emev2_get_core_count(); + unsigned int ncores; + + if (!scu_base) { + scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); + emev2_clock_init(); /* need ioremapped SMU */ + } + + ncores = scu_base ? scu_get_core_count(scu_base) : 1; shmobile_smp_init_cpus(ncores); }