Skip to content

Commit

Permalink
ARM: consolidate last remaining open-coded alignment trap enable
Browse files Browse the repository at this point in the history
We can use the alignment_trap assembly macro here too.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jun 2, 2014
1 parent 0aeb340 commit 8229c54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ ENDPROC(__pabt_svc)
@
@ Enable the alignment trap while in kernel mode
@
alignment_trap r0
alignment_trap r0, .LCcralign

@
@ Clear FP to mark the first stack frame
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,7 @@ ENTRY(vector_swi)
str r0, [sp, #S_OLD_R0] @ Save OLD_R0
#endif
zero_fp

#ifdef CONFIG_ALIGNMENT_TRAP
ldr ip, __cr_alignment
ldr ip, [ip]
mcr p15, 0, ip, c1, c0 @ update control register
#endif

alignment_trap ip, __cr_alignment
enable_irq
ct_user_exit
get_thread_info tsk
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kernel/entry-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#endif
.endm

.macro alignment_trap, rtemp
.macro alignment_trap, rtemp, label
#ifdef CONFIG_ALIGNMENT_TRAP
ldr \rtemp, .LCcralign
ldr \rtemp, \label
ldr \rtemp, [\rtemp]
mcr p15, 0, \rtemp, c1, c0
#endif
Expand Down

0 comments on commit 8229c54

Please sign in to comment.