Skip to content

Commit

Permalink
ARM: 6653/1: bitops: Use BX instead of MOV PC,LR
Browse files Browse the repository at this point in the history
The kernel doesn't officially need to interwork, but using BX
wherever appropriate will help educate people into good assembler
coding habits.

BX is appropriate here because this code is predicated on
__LINUX_ARM_ARCH__ >= 6

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Dave Martin authored and Russell King committed Feb 19, 2011
1 parent 917692f commit 3ba6e69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/lib/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
strex r0, r2, [r1]
cmp r0, #0
bne 1b
mov pc, lr
bx lr
.endm

.macro testop, instr, store
Expand All @@ -33,7 +33,7 @@
smp_dmb
cmp r0, #0
movne r0, #1
2: mov pc, lr
2: bx lr
.endm
#else
.macro bitop, instr
Expand Down

0 comments on commit 3ba6e69

Please sign in to comment.