diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-05-21 13:14:44 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-05-21 13:14:44 -0400 |
commit | 187a51ad11351b009abab688fb7f6d6f3210a45f (patch) | |
tree | a867fb0a99c1eee549404fe9f47f5d7ead066604 /arch/arm | |
parent | 9636273dae265b9354b861b373cd43cd76a6d0fe (diff) |
[PATCH] ARM SMP: consolidate main IRQ handler code
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 4eb36155dc93..b0efbf98d832 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -24,6 +24,19 @@ | |||
24 | #include "entry-header.S" | 24 | #include "entry-header.S" |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Interrupt handling. Preserves r7, r8, r9 | ||
28 | */ | ||
29 | .macro irq_handler | ||
30 | 1: get_irqnr_and_base r0, r6, r5, lr | ||
31 | movne r1, sp | ||
32 | @ | ||
33 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
34 | @ | ||
35 | adrne lr, 1b | ||
36 | bne asm_do_IRQ | ||
37 | .endm | ||
38 | |||
39 | /* | ||
27 | * Invalid mode handlers | 40 | * Invalid mode handlers |
28 | */ | 41 | */ |
29 | .macro inv_entry, sym, reason | 42 | .macro inv_entry, sym, reason |
@@ -136,13 +149,7 @@ __irq_svc: | |||
136 | add r7, r9, #1 @ increment it | 149 | add r7, r9, #1 @ increment it |
137 | str r7, [r8, #TI_PREEMPT] | 150 | str r7, [r8, #TI_PREEMPT] |
138 | #endif | 151 | #endif |
139 | 1: get_irqnr_and_base r0, r6, r5, lr | 152 | irq_handler |
140 | movne r1, sp | ||
141 | @ | ||
142 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
143 | @ | ||
144 | adrne lr, 1b | ||
145 | bne asm_do_IRQ | ||
146 | #ifdef CONFIG_PREEMPT | 153 | #ifdef CONFIG_PREEMPT |
147 | ldr r0, [r8, #TI_FLAGS] @ get flags | 154 | ldr r0, [r8, #TI_FLAGS] @ get flags |
148 | tst r0, #_TIF_NEED_RESCHED | 155 | tst r0, #_TIF_NEED_RESCHED |
@@ -337,13 +344,7 @@ __irq_usr: | |||
337 | add r7, r9, #1 @ increment it | 344 | add r7, r9, #1 @ increment it |
338 | str r7, [r8, #TI_PREEMPT] | 345 | str r7, [r8, #TI_PREEMPT] |
339 | #endif | 346 | #endif |
340 | 1: get_irqnr_and_base r0, r6, r5, lr | 347 | irq_handler |
341 | movne r1, sp | ||
342 | adrne lr, 1b | ||
343 | @ | ||
344 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
345 | @ | ||
346 | bne asm_do_IRQ | ||
347 | #ifdef CONFIG_PREEMPT | 348 | #ifdef CONFIG_PREEMPT |
348 | ldr r0, [r8, #TI_PREEMPT] | 349 | ldr r0, [r8, #TI_PREEMPT] |
349 | teq r0, r7 | 350 | teq r0, r7 |