-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: 6538/1: Subarch IRQ handler macros V3
Per subarch interrupt handler macros V3. This patch breaks out code from the irq_handler macro into arch_irq_handler and arch_irq_handler_default. The macros are put in the header file "entry-macro-multi.S" The arch_irq_handler_default macro is designed to be used by irq_handler in entry-armv.S while arch_irq_handler is suitable for per-subarch use. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- Loading branch information
Magnus Damm
authored and
Russell King
committed
Dec 24, 2010
1 parent
5210864
commit cd544ce
Showing
2 changed files
with
46 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Interrupt handling. Preserves r7, r8, r9 | ||
*/ | ||
.macro arch_irq_handler_default | ||
get_irqnr_preamble r5, lr | ||
1: get_irqnr_and_base r0, r6, r5, lr | ||
movne r1, sp | ||
@ | ||
@ routine called with r0 = irq number, r1 = struct pt_regs * | ||
@ | ||
adrne lr, BSYM(1b) | ||
bne asm_do_IRQ | ||
|
||
#ifdef CONFIG_SMP | ||
/* | ||
* XXX | ||
* | ||
* this macro assumes that irqstat (r6) and base (r5) are | ||
* preserved from get_irqnr_and_base above | ||
*/ | ||
ALT_SMP(test_for_ipi r0, r6, r5, lr) | ||
ALT_UP_B(9997f) | ||
movne r0, sp | ||
adrne lr, BSYM(1b) | ||
bne do_IPI | ||
|
||
#ifdef CONFIG_LOCAL_TIMERS | ||
test_for_ltirq r0, r6, r5, lr | ||
movne r0, sp | ||
adrne lr, BSYM(1b) | ||
bne do_local_timer | ||
#endif | ||
#endif | ||
9997: | ||
.endm | ||
|
||
.macro arch_irq_handler, symbol_name | ||
.align 5 | ||
.global \symbol_name | ||
\symbol_name: | ||
mov r4, lr | ||
arch_irq_handler_default | ||
mov pc, r4 | ||
.endm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters