[PATCH] ARM SMP: consolidate main IRQ handler code
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
This commit is contained in:
parent
9636273dae
commit
187a51ad11
|
@ -23,6 +23,19 @@
|
||||||
|
|
||||||
#include "entry-header.S"
|
#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
|
* Invalid mode handlers
|
||||||
*/
|
*/
|
||||||
|
@ -136,13 +149,7 @@ __irq_svc:
|
||||||
add r7, r9, #1 @ increment it
|
add r7, r9, #1 @ increment it
|
||||||
str r7, [r8, #TI_PREEMPT]
|
str r7, [r8, #TI_PREEMPT]
|
||||||
#endif
|
#endif
|
||||||
1: get_irqnr_and_base r0, r6, r5, lr
|
irq_handler
|
||||||
movne r1, sp
|
|
||||||
@
|
|
||||||
@ routine called with r0 = irq number, r1 = struct pt_regs *
|
|
||||||
@
|
|
||||||
adrne lr, 1b
|
|
||||||
bne asm_do_IRQ
|
|
||||||
#ifdef CONFIG_PREEMPT
|
#ifdef CONFIG_PREEMPT
|
||||||
ldr r0, [r8, #TI_FLAGS] @ get flags
|
ldr r0, [r8, #TI_FLAGS] @ get flags
|
||||||
tst r0, #_TIF_NEED_RESCHED
|
tst r0, #_TIF_NEED_RESCHED
|
||||||
|
@ -337,13 +344,7 @@ __irq_usr:
|
||||||
add r7, r9, #1 @ increment it
|
add r7, r9, #1 @ increment it
|
||||||
str r7, [r8, #TI_PREEMPT]
|
str r7, [r8, #TI_PREEMPT]
|
||||||
#endif
|
#endif
|
||||||
1: get_irqnr_and_base r0, r6, r5, lr
|
irq_handler
|
||||||
movne r1, sp
|
|
||||||
adrne lr, 1b
|
|
||||||
@
|
|
||||||
@ routine called with r0 = irq number, r1 = struct pt_regs *
|
|
||||||
@
|
|
||||||
bne asm_do_IRQ
|
|
||||||
#ifdef CONFIG_PREEMPT
|
#ifdef CONFIG_PREEMPT
|
||||||
ldr r0, [r8, #TI_PREEMPT]
|
ldr r0, [r8, #TI_PREEMPT]
|
||||||
teq r0, r7
|
teq r0, r7
|
||||||
|
|
Loading…
Reference in New Issue