summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-10-06 15:19:14 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-10-17 09:02:44 +0100
commit0af8aa0069e43f90d59666510342c05e97d8c4b8 (patch)
tree9d5e75ed9c91f04d5a547bd884ca9c7f457fc1e9 /arch
parent0b5a1b95dcdfa451125132d5ce3f79a27ffb0950 (diff)
downloadlinux-0af8aa0069e43f90d59666510342c05e97d8c4b8.tar.gz
linux-0af8aa0069e43f90d59666510342c05e97d8c4b8.tar.bz2
linux-0af8aa0069e43f90d59666510342c05e97d8c4b8.zip
ARM: 7124/1: smp: Add a localtimer handler callable from C code
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/localtimer.h4
-rw-r--r--arch/arm/kernel/smp.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h
index 080d74f8128d..3306f281333c 100644
--- a/arch/arm/include/asm/localtimer.h
+++ b/arch/arm/include/asm/localtimer.h
@@ -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
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 2e49f1883fe9..0949007d09a8 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -480,6 +480,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();