aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-12-22 07:20:08 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-24 04:47:36 -0500
commitcd544ce754ac2432ffcc0626ea802d2b30876b50 (patch)
treec1c678191e34ffb3c5bae173579191992ae530aa
parent521086412ee423fbdfc7da81f257239c43f707b4 (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>
-rw-r--r--arch/arm/include/asm/entry-macro-multi.S44
-rw-r--r--arch/arm/kernel/entry-armv.S31
2 files changed, 46 insertions, 29 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
61: 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
349997:
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
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index caa6c396ec78..a866dce611d0 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -25,6 +25,7 @@
25#include <asm/tls.h> 25#include <asm/tls.h>
26 26
27#include "entry-header.S" 27#include "entry-header.S"
28#include <asm/entry-macro-multi.S>
28 29
29/* 30/*
30 * Interrupt handling. Preserves r7, r8, r9 31 * Interrupt handling. Preserves r7, r8, r9
@@ -38,35 +39,7 @@
38 teq r5, #0 39 teq r5, #0
39 movne pc, r5 40 movne pc, r5
40#endif 41#endif
41 get_irqnr_preamble r5, lr 42 arch_irq_handler_default
421: get_irqnr_and_base r0, r6, r5, lr
43 movne r1, sp
44 @
45 @ routine called with r0 = irq number, r1 = struct pt_regs *
46 @
47 adrne lr, BSYM(1b)
48 bne asm_do_IRQ
49
50#ifdef CONFIG_SMP
51 /*
52 * XXX
53 *
54 * this macro assumes that irqstat (r6) and base (r5) are
55 * preserved from get_irqnr_and_base above
56 */
57 ALT_SMP(test_for_ipi r0, r6, r5, lr)
58 ALT_UP_B(9997f)
59 movne r0, sp
60 adrne lr, BSYM(1b)
61 bne do_IPI
62
63#ifdef CONFIG_LOCAL_TIMERS
64 test_for_ltirq r0, r6, r5, lr
65 movne r0, sp
66 adrne lr, BSYM(1b)
67 bne do_local_timer
68#endif
69#endif
709997: 439997:
71 .endm 44 .endm
72 45