summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-21 18:14:44 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-05-21 18:14:44 +0100
commit187a51ad11351b009abab688fb7f6d6f3210a45f (patch)
treea867fb0a99c1eee549404fe9f47f5d7ead066604 /arch
parent9636273dae265b9354b861b373cd43cd76a6d0fe (diff)
downloadop-kernel-dev-187a51ad11351b009abab688fb7f6d6f3210a45f.zip
op-kernel-dev-187a51ad11351b009abab688fb7f6d6f3210a45f.tar.gz
[PATCH] ARM SMP: consolidate main IRQ handler code
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/entry-armv.S29
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 4eb3615..b0efbf98 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -24,6 +24,19 @@
#include "entry-header.S"
/*
+ * Interrupt handling. Preserves r7, r8, r9
+ */
+ .macro irq_handler
+1: get_irqnr_and_base r0, r6, r5, lr
+ movne r1, sp
+ @
+ @ routine called with r0 = irq number, r1 = struct pt_regs *
+ @
+ adrne lr, 1b
+ bne asm_do_IRQ
+ .endm
+
+/*
* Invalid mode handlers
*/
.macro inv_entry, sym, reason
@@ -136,13 +149,7 @@ __irq_svc:
add r7, r9, #1 @ increment it
str r7, [r8, #TI_PREEMPT]
#endif
-1: get_irqnr_and_base r0, r6, r5, lr
- movne r1, sp
- @
- @ routine called with r0 = irq number, r1 = struct pt_regs *
- @
- adrne lr, 1b
- bne asm_do_IRQ
+ irq_handler
#ifdef CONFIG_PREEMPT
ldr r0, [r8, #TI_FLAGS] @ get flags
tst r0, #_TIF_NEED_RESCHED
@@ -337,13 +344,7 @@ __irq_usr:
add r7, r9, #1 @ increment it
str r7, [r8, #TI_PREEMPT]
#endif
-1: get_irqnr_and_base r0, r6, r5, lr
- movne r1, sp
- adrne lr, 1b
- @
- @ routine called with r0 = irq number, r1 = struct pt_regs *
- @
- bne asm_do_IRQ
+ irq_handler
#ifdef CONFIG_PREEMPT
ldr r0, [r8, #TI_PREEMPT]
teq r0, r7
OpenPOWER on IntegriCloud