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

ARM: 5734/1: arm: fix compilation of entry-common.S for older CPUs

Commit 181f817eaaca4c1f introduced some new code to entry-common.S
Sadly, this new code uses 'bx' instruction which is available only on
ARMv5 and higher CPUs. This causes following compilation errors when
building kernel for StrongARM (ARMv4):

arch/arm/kernel/entry-common.S: Assembler messages:
arch/arm/kernel/entry-common.S:129: Error: selected processor does not
support `bx ip'
arch/arm/kernel/entry-common.S:138: Error: selected processor does not
support `bx ip'

Fix these errors by using 'mov pc' instead of 'bx'.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Dmitry Artamonow and committed by
Russell King
6176d394 ca6cfa83

+2 -2
+2 -2
arch/arm/kernel/entry-common.S
··· 126 126 cmp r0, r2 127 127 bne gnu_trace 128 128 ldmia sp!, {r0-r3, ip, lr} 129 - bx ip 129 + mov pc, ip 130 130 131 131 gnu_trace: 132 132 ldr r1, [sp, #20] @ lr of instrumented routine ··· 135 135 mov lr, pc 136 136 mov pc, r2 137 137 ldmia sp!, {r0-r3, ip, lr} 138 - bx ip 138 + mov pc, ip 139 139 140 140 ENTRY(mcount) 141 141 stmdb sp!, {r0-r3, lr}