Skip to content

Commit

Permalink
arm: Use generic timer broadcast receiver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Rutland committed Feb 1, 2013
1 parent 12ad100 commit e2c5011
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu)
*/
static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);

static void ipi_timer(void)
{
struct clock_event_device *evt = &__get_cpu_var(percpu_clockevent);
evt->event_handler(evt);
}

#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
static void smp_timer_broadcast(const struct cpumask *mask)
{
Expand Down Expand Up @@ -596,11 +590,13 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
case IPI_WAKEUP:
break;

#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
case IPI_TIMER:
irq_enter();
ipi_timer();
tick_receive_broadcast();
irq_exit();
break;
#endif

case IPI_RESCHEDULE:
scheduler_ipi();
Expand Down

0 comments on commit e2c5011

Please sign in to comment.