Skip to content

Commit

Permalink
ARM: 7124/1: smp: Add a localtimer handler callable from C code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Guo authored and Russell King committed Oct 17, 2011
1 parent 0b5a1b9 commit 0af8aa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/include/asm/localtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0af8aa0

Please sign in to comment.