diff options
author | Magnus Damm <damm@opensource.se> | 2010-12-22 07:20:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-24 04:47:36 -0500 |
commit | cd544ce754ac2432ffcc0626ea802d2b30876b50 (patch) | |
tree | c1c678191e34ffb3c5bae173579191992ae530aa /arch/arm/include | |
parent | 521086412ee423fbdfc7da81f257239c43f707b4 (diff) |
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>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/entry-macro-multi.S | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/include/asm/entry-macro-multi.S b/arch/arm/include/asm/entry-macro-multi.S new file mode 100644 index 000000000000..44f21d4584e8 --- /dev/null +++ b/arch/arm/include/asm/entry-macro-multi.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Interrupt handling. Preserves r7, r8, r9 | ||
3 | */ | ||
4 | .macro arch_irq_handler_default | ||
5 | get_irqnr_preamble r5, lr | ||
6 | 1: get_irqnr_and_base r0, r6, r5, lr | ||
7 | movne r1, sp | ||
8 | @ | ||
9 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
10 | @ | ||
11 | adrne lr, BSYM(1b) | ||
12 | bne asm_do_IRQ | ||
13 | |||
14 | #ifdef CONFIG_SMP | ||
15 | /* | ||
16 | * XXX | ||
17 | * | ||
18 | * this macro assumes that irqstat (r6) and base (r5) are | ||
19 | * preserved from get_irqnr_and_base above | ||
20 | */ | ||
21 | ALT_SMP(test_for_ipi r0, r6, r5, lr) | ||
22 | ALT_UP_B(9997f) | ||
23 | movne r0, sp | ||
24 | adrne lr, BSYM(1b) | ||
25 | bne do_IPI | ||
26 | |||
27 | #ifdef CONFIG_LOCAL_TIMERS | ||
28 | test_for_ltirq r0, r6, r5, lr | ||
29 | movne r0, sp | ||
30 | adrne lr, BSYM(1b) | ||
31 | bne do_local_timer | ||
32 | #endif | ||
33 | #endif | ||
34 | 9997: | ||
35 | .endm | ||
36 | |||
37 | .macro arch_irq_handler, symbol_name | ||
38 | .align 5 | ||
39 | .global \symbol_name | ||
40 | \symbol_name: | ||
41 | mov r4, lr | ||
42 | arch_irq_handler_default | ||
43 | mov pc, r4 | ||
44 | .endm | ||