diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-22 14:34:09 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-22 14:34:09 -0400 |
commit | f20e3b5fe7ead0615309433260b9784d8da0bbbd (patch) | |
tree | eabb2e47a0355ac4e8024b7087b4e7cb9f324358 /arch/sh/kernel/smp.c | |
parent | bcbfe664e7af019e698cef2feb85ac2b4f1ac11d (diff) | |
parent | f030d7b65e4e6399f23de2a41a58d1b607b6bd89 (diff) |
Merge branch 'for-rmk' of git://git.android.com/kernel into devel
Diffstat (limited to 'arch/sh/kernel/smp.c')
-rw-r--r-- | arch/sh/kernel/smp.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 001778f9adaf..508dfb023628 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SMP support for the SuperH processors. | 4 | * SMP support for the SuperH processors. |
5 | * | 5 | * |
6 | * Copyright (C) 2002 - 2007 Paul Mundt | 6 | * Copyright (C) 2002 - 2008 Paul Mundt |
7 | * Copyright (C) 2006 - 2007 Akio Idehara | 7 | * Copyright (C) 2006 - 2007 Akio Idehara |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -86,9 +86,12 @@ asmlinkage void __cpuinit start_secondary(void) | |||
86 | 86 | ||
87 | local_irq_enable(); | 87 | local_irq_enable(); |
88 | 88 | ||
89 | cpu = smp_processor_id(); | ||
90 | |||
91 | /* Enable local timers */ | ||
92 | local_timer_setup(cpu); | ||
89 | calibrate_delay(); | 93 | calibrate_delay(); |
90 | 94 | ||
91 | cpu = smp_processor_id(); | ||
92 | smp_store_cpu_info(cpu); | 95 | smp_store_cpu_info(cpu); |
93 | 96 | ||
94 | cpu_set(cpu, cpu_online_map); | 97 | cpu_set(cpu, cpu_online_map); |
@@ -186,6 +189,42 @@ void arch_send_call_function_single_ipi(int cpu) | |||
186 | plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE); | 189 | plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE); |
187 | } | 190 | } |
188 | 191 | ||
192 | void smp_timer_broadcast(cpumask_t mask) | ||
193 | { | ||
194 | int cpu; | ||
195 | |||
196 | for_each_cpu_mask(cpu, mask) | ||
197 | plat_send_ipi(cpu, SMP_MSG_TIMER); | ||
198 | } | ||
199 | |||
200 | static void ipi_timer(void) | ||
201 | { | ||
202 | irq_enter(); | ||
203 | local_timer_interrupt(); | ||
204 | irq_exit(); | ||
205 | } | ||
206 | |||
207 | void smp_message_recv(unsigned int msg) | ||
208 | { | ||
209 | switch (msg) { | ||
210 | case SMP_MSG_FUNCTION: | ||
211 | generic_smp_call_function_interrupt(); | ||
212 | break; | ||
213 | case SMP_MSG_RESCHEDULE: | ||
214 | break; | ||
215 | case SMP_MSG_FUNCTION_SINGLE: | ||
216 | generic_smp_call_function_single_interrupt(); | ||
217 | break; | ||
218 | case SMP_MSG_TIMER: | ||
219 | ipi_timer(); | ||
220 | break; | ||
221 | default: | ||
222 | printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n", | ||
223 | smp_processor_id(), __func__, msg); | ||
224 | break; | ||
225 | } | ||
226 | } | ||
227 | |||
189 | /* Not really SMP stuff ... */ | 228 | /* Not really SMP stuff ... */ |
190 | int setup_profiling_timer(unsigned int multiplier) | 229 | int setup_profiling_timer(unsigned int multiplier) |
191 | { | 230 | { |