GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / arm / kernel / entry-armv.S
1 /*
2  *  linux/arch/arm/kernel/entry-armv.S
3  *
4  *  Copyright (C) 1996,1997,1998 Russell King.
5  *  ARM700 fix by Matthew Godbolt (linux-user@willothewisp.demon.co.uk)
6  *  nommu support by Hyok S. Choi (hyok.choi@samsung.com)
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  *
12  *  Low-level vector interface routines
13  *
14  *  Note:  there is a StrongARM bug in the STMIA rn, {regs}^ instruction
15  *  that causes it to save wrong values...  Be aware!
16  */
17
18 #include <linux/init.h>
19
20 #include <asm/assembler.h>
21 #include <asm/memory.h>
22 #include <asm/glue-df.h>
23 #include <asm/glue-pf.h>
24 #include <asm/vfpmacros.h>
25 #ifndef CONFIG_MULTI_IRQ_HANDLER
26 #include <mach/entry-macro.S>
27 #endif
28 #include <asm/thread_notify.h>
29 #include <asm/unwind.h>
30 #include <asm/unistd.h>
31 #include <asm/tls.h>
32 #include <asm/system_info.h>
33 #include <asm/uaccess-asm.h>
34
35 #include "entry-header.S"
36 #include <asm/entry-macro-multi.S>
37 #include <asm/probes.h>
38
39 /*
40  * Interrupt handling.
41  */
42         .macro  irq_handler
43 #ifdef CONFIG_MULTI_IRQ_HANDLER
44         ldr     r1, =handle_arch_irq
45         mov     r0, sp
46         badr    lr, 9997f
47         ldr     pc, [r1]
48 #else
49         arch_irq_handler_default
50 #endif
51 9997:
52         .endm
53
54         .macro  pabt_helper
55         @ PABORT handler takes pt_regs in r2, fault address in r4 and psr in r5
56 #ifdef MULTI_PABORT
57         ldr     ip, .LCprocfns
58         mov     lr, pc
59         ldr     pc, [ip, #PROCESSOR_PABT_FUNC]
60 #else
61         bl      CPU_PABORT_HANDLER
62 #endif
63         .endm
64
65         .macro  dabt_helper
66
67         @
68         @ Call the processor-specific abort handler:
69         @
70         @  r2 - pt_regs
71         @  r4 - aborted context pc
72         @  r5 - aborted context psr
73         @
74         @ The abort handler must return the aborted address in r0, and
75         @ the fault status register in r1.  r9 must be preserved.
76         @
77 #ifdef MULTI_DABORT
78         ldr     ip, .LCprocfns
79         mov     lr, pc
80         ldr     pc, [ip, #PROCESSOR_DABT_FUNC]
81 #else
82         bl      CPU_DABORT_HANDLER
83 #endif
84         .endm
85
86 #ifdef CONFIG_KPROBES
87         .section        .kprobes.text,"ax",%progbits
88 #else
89         .text
90 #endif
91
92 /*
93  * Invalid mode handlers
94  */
95         .macro  inv_entry, reason
96         sub     sp, sp, #PT_REGS_SIZE
97  ARM(   stmib   sp, {r1 - lr}           )
98  THUMB( stmia   sp, {r0 - r12}          )
99  THUMB( str     sp, [sp, #S_SP]         )
100  THUMB( str     lr, [sp, #S_LR]         )
101         mov     r1, #\reason
102         .endm
103
104 __pabt_invalid:
105         inv_entry BAD_PREFETCH
106         b       common_invalid
107 ENDPROC(__pabt_invalid)
108
109 __dabt_invalid:
110         inv_entry BAD_DATA
111         b       common_invalid
112 ENDPROC(__dabt_invalid)
113
114 __irq_invalid:
115         inv_entry BAD_IRQ
116         b       common_invalid
117 ENDPROC(__irq_invalid)
118
119 __und_invalid:
120         inv_entry BAD_UNDEFINSTR
121
122         @
123         @ XXX fall through to common_invalid
124         @
125
126 @
127 @ common_invalid - generic code for failed exception (re-entrant version of handlers)
128 @
129 common_invalid:
130         zero_fp
131
132         ldmia   r0, {r4 - r6}
133         add     r0, sp, #S_PC           @ here for interlock avoidance
134         mov     r7, #-1                 @  ""   ""    ""        ""
135         str     r4, [sp]                @ save preserved r0
136         stmia   r0, {r5 - r7}           @ lr_<exception>,
137                                         @ cpsr_<exception>, "old_r0"
138
139         mov     r0, sp
140         b       bad_mode
141 ENDPROC(__und_invalid)
142
143 /*
144  * SVC mode handlers
145  */
146
147 #if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5)
148 #define SPFIX(code...) code
149 #else
150 #define SPFIX(code...)
151 #endif
152
153         .macro  svc_entry, stack_hole=0, trace=1, uaccess=1
154  UNWIND(.fnstart                )
155  UNWIND(.save {r0 - pc}         )
156         sub     sp, sp, #(SVC_REGS_SIZE + \stack_hole - 4)
157 #ifdef CONFIG_THUMB2_KERNEL
158  SPFIX( str     r0, [sp]        )       @ temporarily saved
159  SPFIX( mov     r0, sp          )
160  SPFIX( tst     r0, #4          )       @ test original stack alignment
161  SPFIX( ldr     r0, [sp]        )       @ restored
162 #else
163  SPFIX( tst     sp, #4          )
164 #endif
165  SPFIX( subeq   sp, sp, #4      )
166         stmia   sp, {r1 - r12}
167
168         ldmia   r0, {r3 - r5}
169         add     r7, sp, #S_SP - 4       @ here for interlock avoidance
170         mov     r6, #-1                 @  ""  ""      ""       ""
171         add     r2, sp, #(SVC_REGS_SIZE + \stack_hole - 4)
172  SPFIX( addeq   r2, r2, #4      )
173         str     r3, [sp, #-4]!          @ save the "real" r0 copied
174                                         @ from the exception stack
175
176         mov     r3, lr
177
178         @
179         @ We are now ready to fill in the remaining blanks on the stack:
180         @
181         @  r2 - sp_svc
182         @  r3 - lr_svc
183         @  r4 - lr_<exception>, already fixed up for correct return/restart
184         @  r5 - spsr_<exception>
185         @  r6 - orig_r0 (see pt_regs definition in ptrace.h)
186         @
187         stmia   r7, {r2 - r6}
188
189         get_thread_info tsk
190         uaccess_entry tsk, r0, r1, r2, \uaccess
191
192         .if \trace
193 #ifdef CONFIG_TRACE_IRQFLAGS
194         bl      trace_hardirqs_off
195 #endif
196         .endif
197         .endm
198
199         .align  5
200 __dabt_svc:
201         svc_entry uaccess=0
202         mov     r2, sp
203         dabt_helper
204  THUMB( ldr     r5, [sp, #S_PSR]        )       @ potentially updated CPSR
205         svc_exit r5                             @ return from exception
206  UNWIND(.fnend          )
207 ENDPROC(__dabt_svc)
208
209         .align  5
210 __irq_svc:
211         svc_entry
212         irq_handler
213
214 #ifdef CONFIG_PREEMPT
215         ldr     r8, [tsk, #TI_PREEMPT]          @ get preempt count
216         ldr     r0, [tsk, #TI_FLAGS]            @ get flags
217         teq     r8, #0                          @ if preempt count != 0
218         movne   r0, #0                          @ force flags to 0
219         tst     r0, #_TIF_NEED_RESCHED
220         blne    svc_preempt
221 #endif
222
223         svc_exit r5, irq = 1                    @ return from exception
224  UNWIND(.fnend          )
225 ENDPROC(__irq_svc)
226
227         .ltorg
228
229 #ifdef CONFIG_PREEMPT
230 svc_preempt:
231         mov     r8, lr
232 1:      bl      preempt_schedule_irq            @ irq en/disable is done inside
233         ldr     r0, [tsk, #TI_FLAGS]            @ get new tasks TI_FLAGS
234         tst     r0, #_TIF_NEED_RESCHED
235         reteq   r8                              @ go again
236         b       1b
237 #endif
238
239 __und_fault:
240         @ Correct the PC such that it is pointing at the instruction
241         @ which caused the fault.  If the faulting instruction was ARM
242         @ the PC will be pointing at the next instruction, and have to
243         @ subtract 4.  Otherwise, it is Thumb, and the PC will be
244         @ pointing at the second half of the Thumb instruction.  We
245         @ have to subtract 2.
246         ldr     r2, [r0, #S_PC]
247         sub     r2, r2, r1
248         str     r2, [r0, #S_PC]
249         b       do_undefinstr
250 ENDPROC(__und_fault)
251
252         .align  5
253 __und_svc:
254 #ifdef CONFIG_KPROBES
255         @ If a kprobe is about to simulate a "stmdb sp..." instruction,
256         @ it obviously needs free stack space which then will belong to
257         @ the saved context.
258         svc_entry MAX_STACK_SIZE
259 #else
260         svc_entry
261 #endif
262         @
263         @ call emulation code, which returns using r9 if it has emulated
264         @ the instruction, or the more conventional lr if we are to treat
265         @ this as a real undefined instruction
266         @
267         @  r0 - instruction
268         @
269 #ifndef CONFIG_THUMB2_KERNEL
270         ldr     r0, [r4, #-4]
271 #else
272         mov     r1, #2
273         ldrh    r0, [r4, #-2]                   @ Thumb instruction at LR - 2
274         cmp     r0, #0xe800                     @ 32-bit instruction if xx >= 0
275         blo     __und_svc_fault
276         ldrh    r9, [r4]                        @ bottom 16 bits
277         add     r4, r4, #2
278         str     r4, [sp, #S_PC]
279         orr     r0, r9, r0, lsl #16
280 #endif
281         badr    r9, __und_svc_finish
282         mov     r2, r4
283         bl      call_fpe
284
285         mov     r1, #4                          @ PC correction to apply
286 __und_svc_fault:
287         mov     r0, sp                          @ struct pt_regs *regs
288         bl      __und_fault
289
290 __und_svc_finish:
291         get_thread_info tsk
292         ldr     r5, [sp, #S_PSR]                @ Get SVC cpsr
293         svc_exit r5                             @ return from exception
294  UNWIND(.fnend          )
295 ENDPROC(__und_svc)
296
297         .align  5
298 __pabt_svc:
299         svc_entry
300         mov     r2, sp                          @ regs
301         pabt_helper
302         svc_exit r5                             @ return from exception
303  UNWIND(.fnend          )
304 ENDPROC(__pabt_svc)
305
306         .align  5
307 __fiq_svc:
308         svc_entry trace=0
309         mov     r0, sp                          @ struct pt_regs *regs
310         bl      handle_fiq_as_nmi
311         svc_exit_via_fiq
312  UNWIND(.fnend          )
313 ENDPROC(__fiq_svc)
314
315         .align  5
316 .LCcralign:
317         .word   cr_alignment
318 #ifdef MULTI_DABORT
319 .LCprocfns:
320         .word   processor
321 #endif
322 .LCfp:
323         .word   fp_enter
324
325 /*
326  * Abort mode handlers
327  */
328
329 @
330 @ Taking a FIQ in abort mode is similar to taking a FIQ in SVC mode
331 @ and reuses the same macros. However in abort mode we must also
332 @ save/restore lr_abt and spsr_abt to make nested aborts safe.
333 @
334         .align 5
335 __fiq_abt:
336         svc_entry trace=0
337
338  ARM(   msr     cpsr_c, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
339  THUMB( mov     r0, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
340  THUMB( msr     cpsr_c, r0 )
341         mov     r1, lr          @ Save lr_abt
342         mrs     r2, spsr        @ Save spsr_abt, abort is now safe
343  ARM(   msr     cpsr_c, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
344  THUMB( mov     r0, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
345  THUMB( msr     cpsr_c, r0 )
346         stmfd   sp!, {r1 - r2}
347
348         add     r0, sp, #8                      @ struct pt_regs *regs
349         bl      handle_fiq_as_nmi
350
351         ldmfd   sp!, {r1 - r2}
352  ARM(   msr     cpsr_c, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
353  THUMB( mov     r0, #ABT_MODE | PSR_I_BIT | PSR_F_BIT )
354  THUMB( msr     cpsr_c, r0 )
355         mov     lr, r1          @ Restore lr_abt, abort is unsafe
356         msr     spsr_cxsf, r2   @ Restore spsr_abt
357  ARM(   msr     cpsr_c, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
358  THUMB( mov     r0, #SVC_MODE | PSR_I_BIT | PSR_F_BIT )
359  THUMB( msr     cpsr_c, r0 )
360
361         svc_exit_via_fiq
362  UNWIND(.fnend          )
363 ENDPROC(__fiq_abt)
364
365 /*
366  * User mode handlers
367  *
368  * EABI note: sp_svc is always 64-bit aligned here, so should PT_REGS_SIZE
369  */
370
371 #if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5) && (PT_REGS_SIZE & 7)
372 #error "sizeof(struct pt_regs) must be a multiple of 8"
373 #endif
374
375         .macro  usr_entry, trace=1, uaccess=1
376  UNWIND(.fnstart        )
377  UNWIND(.cantunwind     )       @ don't unwind the user space
378         sub     sp, sp, #PT_REGS_SIZE
379  ARM(   stmib   sp, {r1 - r12}  )
380  THUMB( stmia   sp, {r0 - r12}  )
381
382  ATRAP( mrc     p15, 0, r7, c1, c0, 0)
383  ATRAP( ldr     r8, .LCcralign)
384
385         ldmia   r0, {r3 - r5}
386         add     r0, sp, #S_PC           @ here for interlock avoidance
387         mov     r6, #-1                 @  ""  ""     ""        ""
388
389         str     r3, [sp]                @ save the "real" r0 copied
390                                         @ from the exception stack
391
392  ATRAP( ldr     r8, [r8, #0])
393
394         @
395         @ We are now ready to fill in the remaining blanks on the stack:
396         @
397         @  r4 - lr_<exception>, already fixed up for correct return/restart
398         @  r5 - spsr_<exception>
399         @  r6 - orig_r0 (see pt_regs definition in ptrace.h)
400         @
401         @ Also, separately save sp_usr and lr_usr
402         @
403         stmia   r0, {r4 - r6}
404  ARM(   stmdb   r0, {sp, lr}^                   )
405  THUMB( store_user_sp_lr r0, r1, S_SP - S_PC    )
406
407         .if \uaccess
408         uaccess_disable ip
409         .endif
410
411         @ Enable the alignment trap while in kernel mode
412  ATRAP( teq     r8, r7)
413  ATRAP( mcrne   p15, 0, r8, c1, c0, 0)
414
415         @
416         @ Clear FP to mark the first stack frame
417         @
418         zero_fp
419
420         .if     \trace
421 #ifdef CONFIG_TRACE_IRQFLAGS
422         bl      trace_hardirqs_off
423 #endif
424         ct_user_exit save = 0
425         .endif
426         .endm
427
428         .macro  kuser_cmpxchg_check
429 #if !defined(CONFIG_CPU_32v6K) && defined(CONFIG_KUSER_HELPERS)
430 #ifndef CONFIG_MMU
431 #warning "NPTL on non MMU needs fixing"
432 #else
433         @ Make sure our user space atomic helper is restarted
434         @ if it was interrupted in a critical region.  Here we
435         @ perform a quick test inline since it should be false
436         @ 99.9999% of the time.  The rest is done out of line.
437         cmp     r4, #TASK_SIZE
438         blhs    kuser_cmpxchg64_fixup
439 #endif
440 #endif
441         .endm
442
443         .align  5
444 __dabt_usr:
445         usr_entry uaccess=0
446         kuser_cmpxchg_check
447         mov     r2, sp
448         dabt_helper
449         b       ret_from_exception
450  UNWIND(.fnend          )
451 ENDPROC(__dabt_usr)
452
453         .align  5
454 __irq_usr:
455         usr_entry
456         kuser_cmpxchg_check
457         irq_handler
458         get_thread_info tsk
459         mov     why, #0
460         b       ret_to_user_from_irq
461  UNWIND(.fnend          )
462 ENDPROC(__irq_usr)
463
464         .ltorg
465
466         .align  5
467 __und_usr:
468         usr_entry uaccess=0
469
470         mov     r2, r4
471         mov     r3, r5
472
473         @ r2 = regs->ARM_pc, which is either 2 or 4 bytes ahead of the
474         @      faulting instruction depending on Thumb mode.
475         @ r3 = regs->ARM_cpsr
476         @
477         @ The emulation code returns using r9 if it has emulated the
478         @ instruction, or the more conventional lr if we are to treat
479         @ this as a real undefined instruction
480         @
481         badr    r9, ret_from_exception
482
483         @ IRQs must be enabled before attempting to read the instruction from
484         @ user space since that could cause a page/translation fault if the
485         @ page table was modified by another CPU.
486         enable_irq
487
488         tst     r3, #PSR_T_BIT                  @ Thumb mode?
489         bne     __und_usr_thumb
490         sub     r4, r2, #4                      @ ARM instr at LR - 4
491 1:      ldrt    r0, [r4]
492  ARM_BE8(rev    r0, r0)                         @ little endian instruction
493
494         uaccess_disable ip
495
496         @ r0 = 32-bit ARM instruction which caused the exception
497         @ r2 = PC value for the following instruction (:= regs->ARM_pc)
498         @ r4 = PC value for the faulting instruction
499         @ lr = 32-bit undefined instruction function
500         badr    lr, __und_usr_fault_32
501         b       call_fpe
502
503 __und_usr_thumb:
504         @ Thumb instruction
505         sub     r4, r2, #2                      @ First half of thumb instr at LR - 2
506 #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7
507 /*
508  * Thumb-2 instruction handling.  Note that because pre-v6 and >= v6 platforms
509  * can never be supported in a single kernel, this code is not applicable at
510  * all when __LINUX_ARM_ARCH__ < 6.  This allows simplifying assumptions to be
511  * made about .arch directives.
512  */
513 #if __LINUX_ARM_ARCH__ < 7
514 /* If the target CPU may not be Thumb-2-capable, a run-time check is needed: */
515 #define NEED_CPU_ARCHITECTURE
516         ldr     r5, .LCcpu_architecture
517         ldr     r5, [r5]
518         cmp     r5, #CPU_ARCH_ARMv7
519         blo     __und_usr_fault_16              @ 16bit undefined instruction
520 /*
521  * The following code won't get run unless the running CPU really is v7, so
522  * coding round the lack of ldrht on older arches is pointless.  Temporarily
523  * override the assembler target arch with the minimum required instead:
524  */
525         .arch   armv6t2
526 #endif
527 2:      ldrht   r5, [r4]
528 ARM_BE8(rev16   r5, r5)                         @ little endian instruction
529         cmp     r5, #0xe800                     @ 32bit instruction if xx != 0
530         blo     __und_usr_fault_16_pan          @ 16bit undefined instruction
531 3:      ldrht   r0, [r2]
532 ARM_BE8(rev16   r0, r0)                         @ little endian instruction
533         uaccess_disable ip
534         add     r2, r2, #2                      @ r2 is PC + 2, make it PC + 4
535         str     r2, [sp, #S_PC]                 @ it's a 2x16bit instr, update
536         orr     r0, r0, r5, lsl #16
537         badr    lr, __und_usr_fault_32
538         @ r0 = the two 16-bit Thumb instructions which caused the exception
539         @ r2 = PC value for the following Thumb instruction (:= regs->ARM_pc)
540         @ r4 = PC value for the first 16-bit Thumb instruction
541         @ lr = 32bit undefined instruction function
542
543 #if __LINUX_ARM_ARCH__ < 7
544 /* If the target arch was overridden, change it back: */
545 #ifdef CONFIG_CPU_32v6K
546         .arch   armv6k
547 #else
548         .arch   armv6
549 #endif
550 #endif /* __LINUX_ARM_ARCH__ < 7 */
551 #else /* !(CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7) */
552         b       __und_usr_fault_16
553 #endif
554  UNWIND(.fnend)
555 ENDPROC(__und_usr)
556
557 /*
558  * The out of line fixup for the ldrt instructions above.
559  */
560         .pushsection .text.fixup, "ax"
561         .align  2
562 4:      str     r4, [sp, #S_PC]                 @ retry current instruction
563         ret     r9
564         .popsection
565         .pushsection __ex_table,"a"
566         .long   1b, 4b
567 #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7
568         .long   2b, 4b
569         .long   3b, 4b
570 #endif
571         .popsection
572
573 /*
574  * Check whether the instruction is a co-processor instruction.
575  * If yes, we need to call the relevant co-processor handler.
576  *
577  * Note that we don't do a full check here for the co-processor
578  * instructions; all instructions with bit 27 set are well
579  * defined.  The only instructions that should fault are the
580  * co-processor instructions.  However, we have to watch out
581  * for the ARM6/ARM7 SWI bug.
582  *
583  * NEON is a special case that has to be handled here. Not all
584  * NEON instructions are co-processor instructions, so we have
585  * to make a special case of checking for them. Plus, there's
586  * five groups of them, so we have a table of mask/opcode pairs
587  * to check against, and if any match then we branch off into the
588  * NEON handler code.
589  *
590  * Emulators may wish to make use of the following registers:
591  *  r0  = instruction opcode (32-bit ARM or two 16-bit Thumb)
592  *  r2  = PC value to resume execution after successful emulation
593  *  r9  = normal "successful" return address
594  *  r10 = this threads thread_info structure
595  *  lr  = unrecognised instruction return address
596  * IRQs enabled, FIQs enabled.
597  */
598         @
599         @ Fall-through from Thumb-2 __und_usr
600         @
601 #ifdef CONFIG_NEON
602         get_thread_info r10                     @ get current thread
603         adr     r6, .LCneon_thumb_opcodes
604         b       2f
605 #endif
606 call_fpe:
607         get_thread_info r10                     @ get current thread
608 #ifdef CONFIG_NEON
609         adr     r6, .LCneon_arm_opcodes
610 2:      ldr     r5, [r6], #4                    @ mask value
611         ldr     r7, [r6], #4                    @ opcode bits matching in mask
612         cmp     r5, #0                          @ end mask?
613         beq     1f
614         and     r8, r0, r5
615         cmp     r8, r7                          @ NEON instruction?
616         bne     2b
617         mov     r7, #1
618         strb    r7, [r10, #TI_USED_CP + 10]     @ mark CP#10 as used
619         strb    r7, [r10, #TI_USED_CP + 11]     @ mark CP#11 as used
620         b       do_vfp                          @ let VFP handler handle this
621 1:
622 #endif
623         tst     r0, #0x08000000                 @ only CDP/CPRT/LDC/STC have bit 27
624         tstne   r0, #0x04000000                 @ bit 26 set on both ARM and Thumb-2
625         reteq   lr
626         and     r8, r0, #0x00000f00             @ mask out CP number
627         mov     r7, #1
628         add     r6, r10, r8, lsr #8             @ add used_cp[] array offset first
629         strb    r7, [r6, #TI_USED_CP]           @ set appropriate used_cp[]
630 #ifdef CONFIG_IWMMXT
631         @ Test if we need to give access to iWMMXt coprocessors
632         ldr     r5, [r10, #TI_FLAGS]
633         rsbs    r7, r8, #(1 << 8)               @ CP 0 or 1 only
634         movcss  r7, r5, lsr #(TIF_USING_IWMMXT + 1)
635         bcs     iwmmxt_task_enable
636 #endif
637  ARM(   add     pc, pc, r8, lsr #6      )
638  THUMB( lsr     r8, r8, #6              )
639  THUMB( add     pc, r8                  )
640         nop
641
642         ret.w   lr                              @ CP#0
643         W(b)    do_fpe                          @ CP#1 (FPE)
644         W(b)    do_fpe                          @ CP#2 (FPE)
645         ret.w   lr                              @ CP#3
646 #ifdef CONFIG_CRUNCH
647         b       crunch_task_enable              @ CP#4 (MaverickCrunch)
648         b       crunch_task_enable              @ CP#5 (MaverickCrunch)
649         b       crunch_task_enable              @ CP#6 (MaverickCrunch)
650 #else
651         ret.w   lr                              @ CP#4
652         ret.w   lr                              @ CP#5
653         ret.w   lr                              @ CP#6
654 #endif
655         ret.w   lr                              @ CP#7
656         ret.w   lr                              @ CP#8
657         ret.w   lr                              @ CP#9
658 #ifdef CONFIG_VFP
659         W(b)    do_vfp                          @ CP#10 (VFP)
660         W(b)    do_vfp                          @ CP#11 (VFP)
661 #else
662         ret.w   lr                              @ CP#10 (VFP)
663         ret.w   lr                              @ CP#11 (VFP)
664 #endif
665         ret.w   lr                              @ CP#12
666         ret.w   lr                              @ CP#13
667         ret.w   lr                              @ CP#14 (Debug)
668         ret.w   lr                              @ CP#15 (Control)
669
670 #ifdef NEED_CPU_ARCHITECTURE
671         .align  2
672 .LCcpu_architecture:
673         .word   __cpu_architecture
674 #endif
675
676 #ifdef CONFIG_NEON
677         .align  6
678
679 .LCneon_arm_opcodes:
680         .word   0xfe000000                      @ mask
681         .word   0xf2000000                      @ opcode
682
683         .word   0xff100000                      @ mask
684         .word   0xf4000000                      @ opcode
685
686         .word   0x00000000                      @ mask
687         .word   0x00000000                      @ opcode
688
689 .LCneon_thumb_opcodes:
690         .word   0xef000000                      @ mask
691         .word   0xef000000                      @ opcode
692
693         .word   0xff100000                      @ mask
694         .word   0xf9000000                      @ opcode
695
696         .word   0x00000000                      @ mask
697         .word   0x00000000                      @ opcode
698 #endif
699
700 do_fpe:
701         ldr     r4, .LCfp
702         add     r10, r10, #TI_FPSTATE           @ r10 = workspace
703         ldr     pc, [r4]                        @ Call FP module USR entry point
704
705 /*
706  * The FP module is called with these registers set:
707  *  r0  = instruction
708  *  r2  = PC+4
709  *  r9  = normal "successful" return address
710  *  r10 = FP workspace
711  *  lr  = unrecognised FP instruction return address
712  */
713
714         .pushsection .data
715         .align  2
716 ENTRY(fp_enter)
717         .word   no_fp
718         .popsection
719
720 ENTRY(no_fp)
721         ret     lr
722 ENDPROC(no_fp)
723
724 __und_usr_fault_32:
725         mov     r1, #4
726         b       1f
727 __und_usr_fault_16_pan:
728         uaccess_disable ip
729 __und_usr_fault_16:
730         mov     r1, #2
731 1:      mov     r0, sp
732         badr    lr, ret_from_exception
733         b       __und_fault
734 ENDPROC(__und_usr_fault_32)
735 ENDPROC(__und_usr_fault_16)
736
737         .align  5
738 __pabt_usr:
739         usr_entry
740         mov     r2, sp                          @ regs
741         pabt_helper
742  UNWIND(.fnend          )
743         /* fall through */
744 /*
745  * This is the return code to user mode for abort handlers
746  */
747 ENTRY(ret_from_exception)
748  UNWIND(.fnstart        )
749  UNWIND(.cantunwind     )
750         get_thread_info tsk
751         mov     why, #0
752         b       ret_to_user
753  UNWIND(.fnend          )
754 ENDPROC(__pabt_usr)
755 ENDPROC(ret_from_exception)
756
757         .align  5
758 __fiq_usr:
759         usr_entry trace=0
760         kuser_cmpxchg_check
761         mov     r0, sp                          @ struct pt_regs *regs
762         bl      handle_fiq_as_nmi
763         get_thread_info tsk
764         restore_user_regs fast = 0, offset = 0
765  UNWIND(.fnend          )
766 ENDPROC(__fiq_usr)
767
768 /*
769  * Register switch for ARMv3 and ARMv4 processors
770  * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
771  * previous and next are guaranteed not to be the same.
772  */
773 ENTRY(__switch_to)
774  UNWIND(.fnstart        )
775  UNWIND(.cantunwind     )
776         add     ip, r1, #TI_CPU_SAVE
777  ARM(   stmia   ip!, {r4 - sl, fp, sp, lr} )    @ Store most regs on stack
778  THUMB( stmia   ip!, {r4 - sl, fp}         )    @ Store most regs on stack
779  THUMB( str     sp, [ip], #4               )
780  THUMB( str     lr, [ip], #4               )
781         ldr     r4, [r2, #TI_TP_VALUE]
782         ldr     r5, [r2, #TI_TP_VALUE + 4]
783 #ifdef CONFIG_CPU_USE_DOMAINS
784         mrc     p15, 0, r6, c3, c0, 0           @ Get domain register
785         str     r6, [r1, #TI_CPU_DOMAIN]        @ Save old domain register
786         ldr     r6, [r2, #TI_CPU_DOMAIN]
787 #endif
788         switch_tls r1, r4, r5, r3, r7
789 #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP)
790         ldr     r7, [r2, #TI_TASK]
791         ldr     r8, =__stack_chk_guard
792         .if (TSK_STACK_CANARY > IMM12_MASK)
793         add     r7, r7, #TSK_STACK_CANARY & ~IMM12_MASK
794         .endif
795         ldr     r7, [r7, #TSK_STACK_CANARY & IMM12_MASK]
796 #endif
797 #ifdef CONFIG_CPU_USE_DOMAINS
798         mcr     p15, 0, r6, c3, c0, 0           @ Set domain register
799 #endif
800         mov     r5, r0
801         add     r4, r2, #TI_CPU_SAVE
802         ldr     r0, =thread_notify_head
803         mov     r1, #THREAD_NOTIFY_SWITCH
804         bl      atomic_notifier_call_chain
805 #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP)
806         str     r7, [r8]
807 #endif
808  THUMB( mov     ip, r4                     )
809         mov     r0, r5
810  ARM(   ldmia   r4, {r4 - sl, fp, sp, pc}  )    @ Load all regs saved previously
811  THUMB( ldmia   ip!, {r4 - sl, fp}         )    @ Load all regs saved previously
812  THUMB( ldr     sp, [ip], #4               )
813  THUMB( ldr     pc, [ip]                   )
814  UNWIND(.fnend          )
815 ENDPROC(__switch_to)
816
817         __INIT
818
819 /*
820  * User helpers.
821  *
822  * Each segment is 32-byte aligned and will be moved to the top of the high
823  * vector page.  New segments (if ever needed) must be added in front of
824  * existing ones.  This mechanism should be used only for things that are
825  * really small and justified, and not be abused freely.
826  *
827  * See Documentation/arm/kernel_user_helpers.txt for formal definitions.
828  */
829  THUMB( .arm    )
830
831         .macro  usr_ret, reg
832 #ifdef CONFIG_ARM_THUMB
833         bx      \reg
834 #else
835         ret     \reg
836 #endif
837         .endm
838
839         .macro  kuser_pad, sym, size
840         .if     (. - \sym) & 3
841         .rept   4 - (. - \sym) & 3
842         .byte   0
843         .endr
844         .endif
845         .rept   (\size - (. - \sym)) / 4
846         .word   0xe7fddef1
847         .endr
848         .endm
849
850 #ifdef CONFIG_KUSER_HELPERS
851         .align  5
852         .globl  __kuser_helper_start
853 __kuser_helper_start:
854
855 /*
856  * Due to the length of some sequences, __kuser_cmpxchg64 spans 2 regular
857  * kuser "slots", therefore 0xffff0f80 is not used as a valid entry point.
858  */
859
860 __kuser_cmpxchg64:                              @ 0xffff0f60
861
862 #if defined(CONFIG_CPU_32v6K)
863
864         stmfd   sp!, {r4, r5, r6, r7}
865         ldrd    r4, r5, [r0]                    @ load old val
866         ldrd    r6, r7, [r1]                    @ load new val
867         smp_dmb arm
868 1:      ldrexd  r0, r1, [r2]                    @ load current val
869         eors    r3, r0, r4                      @ compare with oldval (1)
870         eoreqs  r3, r1, r5                      @ compare with oldval (2)
871         strexdeq r3, r6, r7, [r2]               @ store newval if eq
872         teqeq   r3, #1                          @ success?
873         beq     1b                              @ if no then retry
874         smp_dmb arm
875         rsbs    r0, r3, #0                      @ set returned val and C flag
876         ldmfd   sp!, {r4, r5, r6, r7}
877         usr_ret lr
878
879 #elif !defined(CONFIG_SMP)
880
881 #ifdef CONFIG_MMU
882
883         /*
884          * The only thing that can break atomicity in this cmpxchg64
885          * implementation is either an IRQ or a data abort exception
886          * causing another process/thread to be scheduled in the middle of
887          * the critical sequence.  The same strategy as for cmpxchg is used.
888          */
889         stmfd   sp!, {r4, r5, r6, lr}
890         ldmia   r0, {r4, r5}                    @ load old val
891         ldmia   r1, {r6, lr}                    @ load new val
892 1:      ldmia   r2, {r0, r1}                    @ load current val
893         eors    r3, r0, r4                      @ compare with oldval (1)
894         eoreqs  r3, r1, r5                      @ compare with oldval (2)
895 2:      stmeqia r2, {r6, lr}                    @ store newval if eq
896         rsbs    r0, r3, #0                      @ set return val and C flag
897         ldmfd   sp!, {r4, r5, r6, pc}
898
899         .text
900 kuser_cmpxchg64_fixup:
901         @ Called from kuser_cmpxchg_fixup.
902         @ r4 = address of interrupted insn (must be preserved).
903         @ sp = saved regs. r7 and r8 are clobbered.
904         @ 1b = first critical insn, 2b = last critical insn.
905         @ If r4 >= 1b and r4 <= 2b then saved pc_usr is set to 1b.
906         mov     r7, #0xffff0fff
907         sub     r7, r7, #(0xffff0fff - (0xffff0f60 + (1b - __kuser_cmpxchg64)))
908         subs    r8, r4, r7
909         rsbcss  r8, r8, #(2b - 1b)
910         strcs   r7, [sp, #S_PC]
911 #if __LINUX_ARM_ARCH__ < 6
912         bcc     kuser_cmpxchg32_fixup
913 #endif
914         ret     lr
915         .previous
916
917 #else
918 #warning "NPTL on non MMU needs fixing"
919         mov     r0, #-1
920         adds    r0, r0, #0
921         usr_ret lr
922 #endif
923
924 #else
925 #error "incoherent kernel configuration"
926 #endif
927
928         kuser_pad __kuser_cmpxchg64, 64
929
930 __kuser_memory_barrier:                         @ 0xffff0fa0
931         smp_dmb arm
932         usr_ret lr
933
934         kuser_pad __kuser_memory_barrier, 32
935
936 __kuser_cmpxchg:                                @ 0xffff0fc0
937
938 #if __LINUX_ARM_ARCH__ < 6
939
940 #ifdef CONFIG_MMU
941
942         /*
943          * The only thing that can break atomicity in this cmpxchg
944          * implementation is either an IRQ or a data abort exception
945          * causing another process/thread to be scheduled in the middle
946          * of the critical sequence.  To prevent this, code is added to
947          * the IRQ and data abort exception handlers to set the pc back
948          * to the beginning of the critical section if it is found to be
949          * within that critical section (see kuser_cmpxchg_fixup).
950          */
951 1:      ldr     r3, [r2]                        @ load current val
952         subs    r3, r3, r0                      @ compare with oldval
953 2:      streq   r1, [r2]                        @ store newval if eq
954         rsbs    r0, r3, #0                      @ set return val and C flag
955         usr_ret lr
956
957         .text
958 kuser_cmpxchg32_fixup:
959         @ Called from kuser_cmpxchg_check macro.
960         @ r4 = address of interrupted insn (must be preserved).
961         @ sp = saved regs. r7 and r8 are clobbered.
962         @ 1b = first critical insn, 2b = last critical insn.
963         @ If r4 >= 1b and r4 <= 2b then saved pc_usr is set to 1b.
964         mov     r7, #0xffff0fff
965         sub     r7, r7, #(0xffff0fff - (0xffff0fc0 + (1b - __kuser_cmpxchg)))
966         subs    r8, r4, r7
967         rsbcss  r8, r8, #(2b - 1b)
968         strcs   r7, [sp, #S_PC]
969         ret     lr
970         .previous
971
972 #else
973 #warning "NPTL on non MMU needs fixing"
974         mov     r0, #-1
975         adds    r0, r0, #0
976         usr_ret lr
977 #endif
978
979 #else
980
981         smp_dmb arm
982 1:      ldrex   r3, [r2]
983         subs    r3, r3, r0
984         strexeq r3, r1, [r2]
985         teqeq   r3, #1
986         beq     1b
987         rsbs    r0, r3, #0
988         /* beware -- each __kuser slot must be 8 instructions max */
989         ALT_SMP(b       __kuser_memory_barrier)
990         ALT_UP(usr_ret  lr)
991
992 #endif
993
994         kuser_pad __kuser_cmpxchg, 32
995
996 __kuser_get_tls:                                @ 0xffff0fe0
997         ldr     r0, [pc, #(16 - 8)]     @ read TLS, set in kuser_get_tls_init
998         usr_ret lr
999         mrc     p15, 0, r0, c13, c0, 3  @ 0xffff0fe8 hardware TLS code
1000         kuser_pad __kuser_get_tls, 16
1001         .rep    3
1002         .word   0                       @ 0xffff0ff0 software TLS value, then
1003         .endr                           @ pad up to __kuser_helper_version
1004
1005 __kuser_helper_version:                         @ 0xffff0ffc
1006         .word   ((__kuser_helper_end - __kuser_helper_start) >> 5)
1007
1008         .globl  __kuser_helper_end
1009 __kuser_helper_end:
1010
1011 #endif
1012
1013  THUMB( .thumb  )
1014
1015 /*
1016  * Vector stubs.
1017  *
1018  * This code is copied to 0xffff1000 so we can use branches in the
1019  * vectors, rather than ldr's.  Note that this code must not exceed
1020  * a page size.
1021  *
1022  * Common stub entry macro:
1023  *   Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
1024  *
1025  * SP points to a minimal amount of processor-private memory, the address
1026  * of which is copied into r0 for the mode specific abort handler.
1027  */
1028         .macro  vector_stub, name, mode, correction=0
1029         .align  5
1030
1031 vector_\name:
1032         .if \correction
1033         sub     lr, lr, #\correction
1034         .endif
1035
1036         @ Save r0, lr_<exception> (parent PC)
1037         stmia   sp, {r0, lr}            @ save r0, lr
1038
1039         @ Save spsr_<exception> (parent CPSR)
1040 2:      mrs     lr, spsr
1041         str     lr, [sp, #8]            @ save spsr
1042
1043         @
1044         @ Prepare for SVC32 mode.  IRQs remain disabled.
1045         @
1046         mrs     r0, cpsr
1047         eor     r0, r0, #(\mode ^ SVC_MODE | PSR_ISETSTATE)
1048         msr     spsr_cxsf, r0
1049
1050         @
1051         @ the branch table must immediately follow this code
1052         @
1053         and     lr, lr, #0x0f
1054  THUMB( adr     r0, 1f                  )
1055  THUMB( ldr     lr, [r0, lr, lsl #2]    )
1056         mov     r0, sp
1057  ARM(   ldr     lr, [pc, lr, lsl #2]    )
1058         movs    pc, lr                  @ branch to handler in SVC mode
1059 ENDPROC(vector_\name)
1060
1061 #ifdef CONFIG_HARDEN_BRANCH_HISTORY
1062         .subsection 1
1063         .align 5
1064 vector_bhb_loop8_\name:
1065         .if \correction
1066         sub     lr, lr, #\correction
1067         .endif
1068
1069         @ Save r0, lr_<exception> (parent PC)
1070         stmia   sp, {r0, lr}
1071
1072         @ bhb workaround
1073         mov     r0, #8
1074 3:      W(b)    . + 4
1075         subs    r0, r0, #1
1076         bne     3b
1077         dsb
1078         isb
1079         b       2b
1080 ENDPROC(vector_bhb_loop8_\name)
1081
1082 vector_bhb_bpiall_\name:
1083         .if \correction
1084         sub     lr, lr, #\correction
1085         .endif
1086
1087         @ Save r0, lr_<exception> (parent PC)
1088         stmia   sp, {r0, lr}
1089
1090         @ bhb workaround
1091         mcr     p15, 0, r0, c7, c5, 6   @ BPIALL
1092         @ isb not needed due to "movs pc, lr" in the vector stub
1093         @ which gives a "context synchronisation".
1094         b       2b
1095 ENDPROC(vector_bhb_bpiall_\name)
1096         .previous
1097 #endif
1098
1099         .align  2
1100         @ handler addresses follow this label
1101 1:
1102         .endm
1103
1104         .section .stubs, "ax", %progbits
1105         @ This must be the first word
1106         .word   vector_swi
1107 #ifdef CONFIG_HARDEN_BRANCH_HISTORY
1108         .word   vector_bhb_loop8_swi
1109         .word   vector_bhb_bpiall_swi
1110 #endif
1111
1112 vector_rst:
1113  ARM(   swi     SYS_ERROR0      )
1114  THUMB( svc     #0              )
1115  THUMB( nop                     )
1116         b       vector_und
1117
1118 /*
1119  * Interrupt dispatcher
1120  */
1121         vector_stub     irq, IRQ_MODE, 4
1122
1123         .long   __irq_usr                       @  0  (USR_26 / USR_32)
1124         .long   __irq_invalid                   @  1  (FIQ_26 / FIQ_32)
1125         .long   __irq_invalid                   @  2  (IRQ_26 / IRQ_32)
1126         .long   __irq_svc                       @  3  (SVC_26 / SVC_32)
1127         .long   __irq_invalid                   @  4
1128         .long   __irq_invalid                   @  5
1129         .long   __irq_invalid                   @  6
1130         .long   __irq_invalid                   @  7
1131         .long   __irq_invalid                   @  8
1132         .long   __irq_invalid                   @  9
1133         .long   __irq_invalid                   @  a
1134         .long   __irq_invalid                   @  b
1135         .long   __irq_invalid                   @  c
1136         .long   __irq_invalid                   @  d
1137         .long   __irq_invalid                   @  e
1138         .long   __irq_invalid                   @  f
1139
1140 /*
1141  * Data abort dispatcher
1142  * Enter in ABT mode, spsr = USR CPSR, lr = USR PC
1143  */
1144         vector_stub     dabt, ABT_MODE, 8
1145
1146         .long   __dabt_usr                      @  0  (USR_26 / USR_32)
1147         .long   __dabt_invalid                  @  1  (FIQ_26 / FIQ_32)
1148         .long   __dabt_invalid                  @  2  (IRQ_26 / IRQ_32)
1149         .long   __dabt_svc                      @  3  (SVC_26 / SVC_32)
1150         .long   __dabt_invalid                  @  4
1151         .long   __dabt_invalid                  @  5
1152         .long   __dabt_invalid                  @  6
1153         .long   __dabt_invalid                  @  7
1154         .long   __dabt_invalid                  @  8
1155         .long   __dabt_invalid                  @  9
1156         .long   __dabt_invalid                  @  a
1157         .long   __dabt_invalid                  @  b
1158         .long   __dabt_invalid                  @  c
1159         .long   __dabt_invalid                  @  d
1160         .long   __dabt_invalid                  @  e
1161         .long   __dabt_invalid                  @  f
1162
1163 /*
1164  * Prefetch abort dispatcher
1165  * Enter in ABT mode, spsr = USR CPSR, lr = USR PC
1166  */
1167         vector_stub     pabt, ABT_MODE, 4
1168
1169         .long   __pabt_usr                      @  0 (USR_26 / USR_32)
1170         .long   __pabt_invalid                  @  1 (FIQ_26 / FIQ_32)
1171         .long   __pabt_invalid                  @  2 (IRQ_26 / IRQ_32)
1172         .long   __pabt_svc                      @  3 (SVC_26 / SVC_32)
1173         .long   __pabt_invalid                  @  4
1174         .long   __pabt_invalid                  @  5
1175         .long   __pabt_invalid                  @  6
1176         .long   __pabt_invalid                  @  7
1177         .long   __pabt_invalid                  @  8
1178         .long   __pabt_invalid                  @  9
1179         .long   __pabt_invalid                  @  a
1180         .long   __pabt_invalid                  @  b
1181         .long   __pabt_invalid                  @  c
1182         .long   __pabt_invalid                  @  d
1183         .long   __pabt_invalid                  @  e
1184         .long   __pabt_invalid                  @  f
1185
1186 /*
1187  * Undef instr entry dispatcher
1188  * Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
1189  */
1190         vector_stub     und, UND_MODE
1191
1192         .long   __und_usr                       @  0 (USR_26 / USR_32)
1193         .long   __und_invalid                   @  1 (FIQ_26 / FIQ_32)
1194         .long   __und_invalid                   @  2 (IRQ_26 / IRQ_32)
1195         .long   __und_svc                       @  3 (SVC_26 / SVC_32)
1196         .long   __und_invalid                   @  4
1197         .long   __und_invalid                   @  5
1198         .long   __und_invalid                   @  6
1199         .long   __und_invalid                   @  7
1200         .long   __und_invalid                   @  8
1201         .long   __und_invalid                   @  9
1202         .long   __und_invalid                   @  a
1203         .long   __und_invalid                   @  b
1204         .long   __und_invalid                   @  c
1205         .long   __und_invalid                   @  d
1206         .long   __und_invalid                   @  e
1207         .long   __und_invalid                   @  f
1208
1209         .align  5
1210
1211 /*=============================================================================
1212  * Address exception handler
1213  *-----------------------------------------------------------------------------
1214  * These aren't too critical.
1215  * (they're not supposed to happen, and won't happen in 32-bit data mode).
1216  */
1217
1218 vector_addrexcptn:
1219         b       vector_addrexcptn
1220
1221 /*=============================================================================
1222  * FIQ "NMI" handler
1223  *-----------------------------------------------------------------------------
1224  * Handle a FIQ using the SVC stack allowing FIQ act like NMI on x86
1225  * systems. This must be the last vector stub, so lets place it in its own
1226  * subsection.
1227  */
1228         .subsection 2
1229         vector_stub     fiq, FIQ_MODE, 4
1230
1231         .long   __fiq_usr                       @  0  (USR_26 / USR_32)
1232         .long   __fiq_svc                       @  1  (FIQ_26 / FIQ_32)
1233         .long   __fiq_svc                       @  2  (IRQ_26 / IRQ_32)
1234         .long   __fiq_svc                       @  3  (SVC_26 / SVC_32)
1235         .long   __fiq_svc                       @  4
1236         .long   __fiq_svc                       @  5
1237         .long   __fiq_svc                       @  6
1238         .long   __fiq_abt                       @  7
1239         .long   __fiq_svc                       @  8
1240         .long   __fiq_svc                       @  9
1241         .long   __fiq_svc                       @  a
1242         .long   __fiq_svc                       @  b
1243         .long   __fiq_svc                       @  c
1244         .long   __fiq_svc                       @  d
1245         .long   __fiq_svc                       @  e
1246         .long   __fiq_svc                       @  f
1247
1248         .globl  vector_fiq
1249
1250         .section .vectors, "ax", %progbits
1251 .L__vectors_start:
1252         W(b)    vector_rst
1253         W(b)    vector_und
1254         W(ldr)  pc, .L__vectors_start + 0x1000
1255         W(b)    vector_pabt
1256         W(b)    vector_dabt
1257         W(b)    vector_addrexcptn
1258         W(b)    vector_irq
1259         W(b)    vector_fiq
1260
1261 #ifdef CONFIG_HARDEN_BRANCH_HISTORY
1262         .section .vectors.bhb.loop8, "ax", %progbits
1263 .L__vectors_bhb_loop8_start:
1264         W(b)    vector_rst
1265         W(b)    vector_bhb_loop8_und
1266         W(ldr)  pc, .L__vectors_bhb_loop8_start + 0x1004
1267         W(b)    vector_bhb_loop8_pabt
1268         W(b)    vector_bhb_loop8_dabt
1269         W(b)    vector_addrexcptn
1270         W(b)    vector_bhb_loop8_irq
1271         W(b)    vector_bhb_loop8_fiq
1272
1273         .section .vectors.bhb.bpiall, "ax", %progbits
1274 .L__vectors_bhb_bpiall_start:
1275         W(b)    vector_rst
1276         W(b)    vector_bhb_bpiall_und
1277         W(ldr)  pc, .L__vectors_bhb_bpiall_start + 0x1008
1278         W(b)    vector_bhb_bpiall_pabt
1279         W(b)    vector_bhb_bpiall_dabt
1280         W(b)    vector_addrexcptn
1281         W(b)    vector_bhb_bpiall_irq
1282         W(b)    vector_bhb_bpiall_fiq
1283 #endif
1284
1285         .data
1286         .align  2
1287
1288         .globl  cr_alignment
1289 cr_alignment:
1290         .space  4
1291
1292 #ifdef CONFIG_MULTI_IRQ_HANDLER
1293         .globl  handle_arch_irq
1294 handle_arch_irq:
1295         .space  4
1296 #endif