diff options
Diffstat (limited to 'arch/arm/mach-vexpress/platsmp.c')
-rw-r--r-- | arch/arm/mach-vexpress/platsmp.c | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index b5a758683668..a0341d14ff2a 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | 18 | ||
19 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
20 | #include <asm/localtimer.h> | ||
21 | #include <asm/smp_scu.h> | 20 | #include <asm/smp_scu.h> |
22 | #include <asm/unified.h> | 21 | #include <asm/unified.h> |
23 | 22 | ||
@@ -136,20 +135,10 @@ void __init smp_init_cpus(void) | |||
136 | set_cpu_possible(i, true); | 135 | set_cpu_possible(i, true); |
137 | } | 136 | } |
138 | 137 | ||
139 | void __init smp_prepare_cpus(unsigned int max_cpus) | 138 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
140 | { | 139 | { |
141 | unsigned int ncores = num_possible_cpus(); | ||
142 | unsigned int cpu = smp_processor_id(); | ||
143 | int i; | 140 | int i; |
144 | 141 | ||
145 | smp_store_cpu_info(cpu); | ||
146 | |||
147 | /* | ||
148 | * are we trying to boot more cores than exist? | ||
149 | */ | ||
150 | if (max_cpus > ncores) | ||
151 | max_cpus = ncores; | ||
152 | |||
153 | /* | 142 | /* |
154 | * Initialise the present map, which describes the set of CPUs | 143 | * Initialise the present map, which describes the set of CPUs |
155 | * actually populated at the present time. | 144 | * actually populated at the present time. |
@@ -157,27 +146,15 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
157 | for (i = 0; i < max_cpus; i++) | 146 | for (i = 0; i < max_cpus; i++) |
158 | set_cpu_present(i, true); | 147 | set_cpu_present(i, true); |
159 | 148 | ||
149 | scu_enable(scu_base_addr()); | ||
150 | |||
160 | /* | 151 | /* |
161 | * Initialise the SCU if there are more than one CPU and let | 152 | * Write the address of secondary startup into the |
162 | * them know where to start. | 153 | * system-wide flags register. The boot monitor waits |
154 | * until it receives a soft interrupt, and then the | ||
155 | * secondary CPU branches to this address. | ||
163 | */ | 156 | */ |
164 | if (max_cpus > 1) { | 157 | writel(~0, MMIO_P2V(V2M_SYS_FLAGSCLR)); |
165 | /* | 158 | writel(BSYM(virt_to_phys(vexpress_secondary_startup)), |
166 | * Enable the local timer or broadcast device for the | 159 | MMIO_P2V(V2M_SYS_FLAGSSET)); |
167 | * boot CPU, but only if we have more than one CPU. | ||
168 | */ | ||
169 | percpu_timer_setup(); | ||
170 | |||
171 | scu_enable(scu_base_addr()); | ||
172 | |||
173 | /* | ||
174 | * Write the address of secondary startup into the | ||
175 | * system-wide flags register. The boot monitor waits | ||
176 | * until it receives a soft interrupt, and then the | ||
177 | * secondary CPU branches to this address. | ||
178 | */ | ||
179 | writel(~0, MMIO_P2V(V2M_SYS_FLAGSCLR)); | ||
180 | writel(BSYM(virt_to_phys(vexpress_secondary_startup)), | ||
181 | MMIO_P2V(V2M_SYS_FLAGSSET)); | ||
182 | } | ||
183 | } | 160 | } |