Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 6653/1: bitops: Use BX instead of MOV PC,LR

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>

authored by

Dave Martin and committed by
Russell King
3ba6e69a 917692f5

+2 -2
+2 -2
arch/arm/lib/bitops.h
··· 12 12 strex r0, r2, [r1] 13 13 cmp r0, #0 14 14 bne 1b 15 - mov pc, lr 15 + bx lr 16 16 .endm 17 17 18 18 .macro testop, instr, store ··· 33 33 smp_dmb 34 34 cmp r0, #0 35 35 movne r0, #1 36 - 2: mov pc, lr 36 + 2: bx lr 37 37 .endm 38 38 #else 39 39 .macro bitop, instr