aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-armv.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/entry-armv.S')
-rw-r--r--arch/arm/kernel/entry-armv.S56
1 files changed, 23 insertions, 33 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index bb96a7d4bbf5..2b46fea36c9f 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -25,42 +25,22 @@
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
31 */ 32 */
32 .macro irq_handler 33 .macro irq_handler
33 get_irqnr_preamble r5, lr 34#ifdef CONFIG_MULTI_IRQ_HANDLER
341: get_irqnr_and_base r0, r6, r5, lr 35 ldr r5, =handle_arch_irq
35 movne r1, sp 36 mov r0, sp
36 @ 37 ldr r5, [r5]
37 @ routine called with r0 = irq number, r1 = struct pt_regs * 38 adr lr, BSYM(9997f)
38 @ 39 teq r5, #0
39 adrne lr, BSYM(1b) 40 movne pc, r5
40 bne asm_do_IRQ
41
42#ifdef CONFIG_SMP
43 /*
44 * XXX
45 *
46 * this macro assumes that irqstat (r6) and base (r5) are
47 * preserved from get_irqnr_and_base above
48 */
49 ALT_SMP(test_for_ipi r0, r6, r5, lr)
50 ALT_UP_B(9997f)
51 movne r0, sp
52 adrne lr, BSYM(1b)
53 bne do_IPI
54
55#ifdef CONFIG_LOCAL_TIMERS
56 test_for_ltirq r0, r6, r5, lr
57 movne r0, sp
58 adrne lr, BSYM(1b)
59 bne do_local_timer
60#endif 41#endif
42 arch_irq_handler_default
619997: 439997:
62#endif
63
64 .endm 44 .endm
65 45
66#ifdef CONFIG_KPROBES 46#ifdef CONFIG_KPROBES
@@ -198,6 +178,7 @@ __dabt_svc:
198 @ 178 @
199 @ set desired IRQ state, then call main handler 179 @ set desired IRQ state, then call main handler
200 @ 180 @
181 debug_entry r1
201 msr cpsr_c, r9 182 msr cpsr_c, r9
202 mov r2, sp 183 mov r2, sp
203 bl do_DataAbort 184 bl do_DataAbort
@@ -324,6 +305,7 @@ __pabt_svc:
324#else 305#else
325 bl CPU_PABORT_HANDLER 306 bl CPU_PABORT_HANDLER
326#endif 307#endif
308 debug_entry r1
327 msr cpsr_c, r9 @ Maybe enable interrupts 309 msr cpsr_c, r9 @ Maybe enable interrupts
328 mov r2, sp @ regs 310 mov r2, sp @ regs
329 bl do_PrefetchAbort @ call abort handler 311 bl do_PrefetchAbort @ call abort handler
@@ -439,6 +421,7 @@ __dabt_usr:
439 @ 421 @
440 @ IRQs on, then call the main handler 422 @ IRQs on, then call the main handler
441 @ 423 @
424 debug_entry r1
442 enable_irq 425 enable_irq
443 mov r2, sp 426 mov r2, sp
444 adr lr, BSYM(ret_from_exception) 427 adr lr, BSYM(ret_from_exception)
@@ -703,6 +686,7 @@ __pabt_usr:
703#else 686#else
704 bl CPU_PABORT_HANDLER 687 bl CPU_PABORT_HANDLER
705#endif 688#endif
689 debug_entry r1
706 enable_irq @ Enable interrupts 690 enable_irq @ Enable interrupts
707 mov r2, sp @ regs 691 mov r2, sp @ regs
708 bl do_PrefetchAbort @ call abort handler 692 bl do_PrefetchAbort @ call abort handler
@@ -735,7 +719,7 @@ ENTRY(__switch_to)
735 THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack 719 THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack
736 THUMB( str sp, [ip], #4 ) 720 THUMB( str sp, [ip], #4 )
737 THUMB( str lr, [ip], #4 ) 721 THUMB( str lr, [ip], #4 )
738#ifdef CONFIG_MMU 722#ifdef CONFIG_CPU_USE_DOMAINS
739 ldr r6, [r2, #TI_CPU_DOMAIN] 723 ldr r6, [r2, #TI_CPU_DOMAIN]
740#endif 724#endif
741 set_tls r3, r4, r5 725 set_tls r3, r4, r5
@@ -744,7 +728,7 @@ ENTRY(__switch_to)
744 ldr r8, =__stack_chk_guard 728 ldr r8, =__stack_chk_guard
745 ldr r7, [r7, #TSK_STACK_CANARY] 729 ldr r7, [r7, #TSK_STACK_CANARY]
746#endif 730#endif
747#ifdef CONFIG_MMU 731#ifdef CONFIG_CPU_USE_DOMAINS
748 mcr p15, 0, r6, c3, c0, 0 @ Set domain register 732 mcr p15, 0, r6, c3, c0, 0 @ Set domain register
749#endif 733#endif
750 mov r5, r0 734 mov r5, r0
@@ -842,7 +826,7 @@ __kuser_helper_start:
842 */ 826 */
843 827
844__kuser_memory_barrier: @ 0xffff0fa0 828__kuser_memory_barrier: @ 0xffff0fa0
845 smp_dmb 829 smp_dmb arm
846 usr_ret lr 830 usr_ret lr
847 831
848 .align 5 832 .align 5
@@ -959,7 +943,7 @@ kuser_cmpxchg_fixup:
959 943
960#else 944#else
961 945
962 smp_dmb 946 smp_dmb arm
9631: ldrex r3, [r2] 9471: ldrex r3, [r2]
964 subs r3, r3, r0 948 subs r3, r3, r0
965 strexeq r3, r1, [r2] 949 strexeq r3, r1, [r2]
@@ -1245,3 +1229,9 @@ cr_alignment:
1245 .space 4 1229 .space 4
1246cr_no_alignment: 1230cr_no_alignment:
1247 .space 4 1231 .space 4
1232
1233#ifdef CONFIG_MULTI_IRQ_HANDLER
1234 .globl handle_arch_irq
1235handle_arch_irq:
1236 .space 4
1237#endif