@@ -10,6 +10,8 @@
#ifndef __ASM_ARM_LOCALTIMER_H
#define __ASM_ARM_LOCALTIMER_H
+#include <linux/interrupt.h>
+
struct clock_event_device;
/*
@@ -22,6 +24,10 @@ void percpu_timer_setup(void);
*/
asmlinkage void do_local_timer(struct pt_regs *);
+/*
+ * Per-cpu timer IRQ handler
+ */
+irqreturn_t percpu_timer_handler(int irq, void *dev_id);
#ifdef CONFIG_LOCAL_TIMERS
@@ -459,6 +459,18 @@ asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs)
set_irq_regs(old_regs);
}
+irqreturn_t percpu_timer_handler(int irq, void *dev_id)
+{
+ struct clock_event_device *evt = dev_id;
+
+ if (local_timer_ack()) {
+ evt->event_handler(evt);
+ return IRQ_HANDLED;
+ }
+
+ return IRQ_NONE;
+}
+
void show_local_irqs(struct seq_file *p, int prec)
{
unsigned int cpu;
Provide a "normal" interrupt handler for local timers. It is expected that most timer implementations will use this handler unless they have more specific requirements. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- arch/arm/include/asm/localtimer.h | 6 ++++++ arch/arm/kernel/smp.c | 12 ++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-)