aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/smp.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2012-10-30 07:17:01 -0400
committerMark Rutland <mark.rutland@arm.com>2013-02-01 04:14:01 -0500
commite2c501190c7d4bf9d7febb9e1f1094cbde59ed89 (patch)
treeea7d8424520a88185434b9e4c8ecc1881c5ea9df /arch/arm/kernel/smp.c
parent12ad10004645d38356b14d1fbba379c523a61916 (diff)
arm: Use generic timer broadcast receiver
Currently, the ARM backend must maintain a redundant list of timers for the purpose of centralising timer broadcast functionality. This prevents sharing timer drivers across architectures. This patch moves the pain of dealing with timer broadcasts to the core clockevents tick broadcast code, which already maintains its own list of timers. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r--arch/arm/kernel/smp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 84f4cbf652e5..930851912b37 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -475,12 +475,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu)
475 */ 475 */
476static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent); 476static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
477 477
478static void ipi_timer(void)
479{
480 struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
481 evt->event_handler(evt);
482}
483
484#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST 478#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
485static void smp_timer_broadcast(const struct cpumask *mask) 479static void smp_timer_broadcast(const struct cpumask *mask)
486{ 480{
@@ -596,11 +590,13 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
596 case IPI_WAKEUP: 590 case IPI_WAKEUP:
597 break; 591 break;
598 592
593#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
599 case IPI_TIMER: 594 case IPI_TIMER:
600 irq_enter(); 595 irq_enter();
601 ipi_timer(); 596 tick_receive_broadcast();
602 irq_exit(); 597 irq_exit();
603 break; 598 break;
599#endif
604 600
605 case IPI_RESCHEDULE: 601 case IPI_RESCHEDULE:
606 scheduler_ipi(); 602 scheduler_ipi();