ARM: consolidate last remaining open-coded alignment trap enable
We can use the alignment_trap assembly macro here too. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
0aeb3408ca
commit
8229c54fa1
3 changed files with 4 additions and 10 deletions
|
@ -344,7 +344,7 @@ ENDPROC(__pabt_svc)
|
||||||
@
|
@
|
||||||
@ Enable the alignment trap while in kernel mode
|
@ Enable the alignment trap while in kernel mode
|
||||||
@
|
@
|
||||||
alignment_trap r0
|
alignment_trap r0, .LCcralign
|
||||||
|
|
||||||
@
|
@
|
||||||
@ Clear FP to mark the first stack frame
|
@ Clear FP to mark the first stack frame
|
||||||
|
|
|
@ -365,13 +365,7 @@ ENTRY(vector_swi)
|
||||||
str r0, [sp, #S_OLD_R0] @ Save OLD_R0
|
str r0, [sp, #S_OLD_R0] @ Save OLD_R0
|
||||||
#endif
|
#endif
|
||||||
zero_fp
|
zero_fp
|
||||||
|
alignment_trap ip, __cr_alignment
|
||||||
#ifdef CONFIG_ALIGNMENT_TRAP
|
|
||||||
ldr ip, __cr_alignment
|
|
||||||
ldr ip, [ip]
|
|
||||||
mcr p15, 0, ip, c1, c0 @ update control register
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enable_irq
|
enable_irq
|
||||||
ct_user_exit
|
ct_user_exit
|
||||||
get_thread_info tsk
|
get_thread_info tsk
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro alignment_trap, rtemp
|
.macro alignment_trap, rtemp, label
|
||||||
#ifdef CONFIG_ALIGNMENT_TRAP
|
#ifdef CONFIG_ALIGNMENT_TRAP
|
||||||
ldr \rtemp, .LCcralign
|
ldr \rtemp, \label
|
||||||
ldr \rtemp, [\rtemp]
|
ldr \rtemp, [\rtemp]
|
||||||
mcr p15, 0, \rtemp, c1, c0
|
mcr p15, 0, \rtemp, c1, c0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue