ARM: 7124/1: smp: Add a localtimer handler callable from C code
authorShawn Guo <shawn.guo@linaro.org>
Thu, 6 Oct 2011 14:19:14 +0000 (15:19 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 17 Oct 2011 08:02:44 +0000 (09:02 +0100)
In order to be able to handle localtimer directly from C code instead of
assembly code, introduce handle_local_timer(), which is modeled after
handle_IRQ().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/localtimer.h
arch/arm/kernel/smp.c

index 080d74f..3306f28 100644 (file)
@@ -22,6 +22,10 @@ void percpu_timer_setup(void);
  */
 asmlinkage void do_local_timer(struct pt_regs *);
 
+/*
+ * Called from C code
+ */
+void handle_local_timer(struct pt_regs *);
 
 #ifdef CONFIG_LOCAL_TIMERS
 
index 2e49f18..0949007 100644 (file)
@@ -479,6 +479,11 @@ static void ipi_timer(void)
 
 #ifdef CONFIG_LOCAL_TIMERS
 asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs)
+{
+       handle_local_timer(regs);
+}
+
+void handle_local_timer(struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
        int cpu = smp_processor_id();