aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-03 06:09:48 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-20 10:09:08 -0500
commit05c74a6cbcfb416286a947668ba32f63d99fe74a (patch)
tree96f4dd3d5cbc67b14b93e9630f4f02becaa1a66a /arch/arm/mach-ux500
parentaec66ba1f75c2030cf66f5a21d1c81aa83aa5d95 (diff)
ARM: SMP: consolidate the common parts of smp_prepare_cpus()
There is a certain amount of smp_prepare_cpus() which doesn't belong in the platform support code - that is, code which is invariant to the SMP implementation. Move this code into arch/arm/kernel/smp.c, and add a platform_ prefix to the original function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/platsmp.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index fd40fa175913..458a288981cb 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -18,7 +18,6 @@
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/localtimer.h>
22#include <asm/smp_scu.h> 21#include <asm/smp_scu.h>
23#include <mach/hardware.h> 22#include <mach/hardware.h>
24 23
@@ -138,20 +137,10 @@ void __init smp_init_cpus(void)
138 set_cpu_possible(i, true); 137 set_cpu_possible(i, true);
139} 138}
140 139
141void __init smp_prepare_cpus(unsigned int max_cpus) 140void __init platform_smp_prepare_cpus(unsigned int max_cpus)
142{ 141{
143 unsigned int ncores = num_possible_cpus();
144 unsigned int cpu = smp_processor_id();
145 int i; 142 int i;
146 143
147 smp_store_cpu_info(cpu);
148
149 /*
150 * are we trying to boot more cores than exist?
151 */
152 if (max_cpus > ncores)
153 max_cpus = ncores;
154
155 /* 144 /*
156 * Initialise the present map, which describes the set of CPUs 145 * Initialise the present map, which describes the set of CPUs
157 * actually populated at the present time. 146 * actually populated at the present time.
@@ -159,13 +148,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
159 for (i = 0; i < max_cpus; i++) 148 for (i = 0; i < max_cpus; i++)
160 set_cpu_present(i, true); 149 set_cpu_present(i, true);
161 150
162 if (max_cpus > 1) { 151 scu_enable(__io_address(UX500_SCU_BASE));
163 /* 152 wakeup_secondary();
164 * Enable the local timer or broadcast device for the
165 * boot CPU, but only if we have more than one CPU.
166 */
167 percpu_timer_setup();
168 scu_enable(__io_address(UX500_SCU_BASE));
169 wakeup_secondary();
170 }
171} 153}