diff options
author | Bob Liu <lliubbo@gmail.com> | 2011-12-11 22:04:05 -0500 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-01-08 21:26:15 -0500 |
commit | d0014be47dc90d15adf7d6e09031d06e2aa7ce79 (patch) | |
tree | 1f633a783e6536a0e24ad0453533882dc21ca1bd /arch/blackfin/kernel | |
parent | 16df3666f43507a6d21e192dae39b69cafc17089 (diff) |
blackfin: smp: cleanup smp code
move idle task point to percpu blackfin_cpudata and add smp_timer_broadcast
interface.
enable SUPPLE_1_WAKEUP and add BFIN_IPI_TIMER ipi support.
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/time-ts.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c index 1bcf3a3c57d8..6efd944a2f33 100644 --- a/arch/blackfin/kernel/time-ts.c +++ b/arch/blackfin/kernel/time-ts.c | |||
@@ -219,7 +219,7 @@ static void __init bfin_gptmr0_clockevent_init(struct clock_event_device *evt) | |||
219 | 219 | ||
220 | #if defined(CONFIG_TICKSOURCE_CORETMR) | 220 | #if defined(CONFIG_TICKSOURCE_CORETMR) |
221 | /* per-cpu local core timer */ | 221 | /* per-cpu local core timer */ |
222 | static DEFINE_PER_CPU(struct clock_event_device, coretmr_events); | 222 | DEFINE_PER_CPU(struct clock_event_device, coretmr_events); |
223 | 223 | ||
224 | static int bfin_coretmr_set_next_event(unsigned long cycles, | 224 | static int bfin_coretmr_set_next_event(unsigned long cycles, |
225 | struct clock_event_device *evt) | 225 | struct clock_event_device *evt) |
@@ -281,6 +281,25 @@ void bfin_coretmr_init(void) | |||
281 | #ifdef CONFIG_CORE_TIMER_IRQ_L1 | 281 | #ifdef CONFIG_CORE_TIMER_IRQ_L1 |
282 | __attribute__((l1_text)) | 282 | __attribute__((l1_text)) |
283 | #endif | 283 | #endif |
284 | |||
285 | static void broadcast_timer_set_mode(enum clock_event_mode mode, | ||
286 | struct clock_event_device *evt) | ||
287 | { | ||
288 | } | ||
289 | |||
290 | static void __cpuinit broadcast_timer_setup(struct clock_event_device *evt) | ||
291 | { | ||
292 | evt->name = "dummy_timer"; | ||
293 | evt->features = CLOCK_EVT_FEAT_ONESHOT | | ||
294 | CLOCK_EVT_FEAT_PERIODIC | | ||
295 | CLOCK_EVT_FEAT_DUMMY; | ||
296 | evt->rating = 400; | ||
297 | evt->mult = 1; | ||
298 | evt->set_mode = broadcast_timer_set_mode; | ||
299 | |||
300 | clockevents_register_device(evt); | ||
301 | } | ||
302 | |||
284 | irqreturn_t bfin_coretmr_interrupt(int irq, void *dev_id) | 303 | irqreturn_t bfin_coretmr_interrupt(int irq, void *dev_id) |
285 | { | 304 | { |
286 | int cpu = smp_processor_id(); | 305 | int cpu = smp_processor_id(); |
@@ -306,6 +325,11 @@ void bfin_coretmr_clockevent_init(void) | |||
306 | unsigned int cpu = smp_processor_id(); | 325 | unsigned int cpu = smp_processor_id(); |
307 | struct clock_event_device *evt = &per_cpu(coretmr_events, cpu); | 326 | struct clock_event_device *evt = &per_cpu(coretmr_events, cpu); |
308 | 327 | ||
328 | #ifdef CONFIG_SMP | ||
329 | evt->broadcast = smp_timer_broadcast; | ||
330 | #endif | ||
331 | |||
332 | |||
309 | evt->name = "bfin_core_timer"; | 333 | evt->name = "bfin_core_timer"; |
310 | evt->rating = 350; | 334 | evt->rating = 350; |
311 | evt->irq = -1; | 335 | evt->irq = -1; |