Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6176d394 authored by Dmitry Artamonow's avatar Dmitry Artamonow Committed by Russell King
Browse files

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



Commit 181f817e 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: default avatarDmitry Artamonow <mad_soft@inbox.ru>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ca6cfa83
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -126,7 +126,7 @@ ENTRY(__gnu_mcount_nc)
	cmp r0, r2
	cmp r0, r2
	bne gnu_trace
	bne gnu_trace
	ldmia sp!, {r0-r3, ip, lr}
	ldmia sp!, {r0-r3, ip, lr}
	bx ip
	mov pc, ip


gnu_trace:
gnu_trace:
	ldr r1, [sp, #20]			@ lr of instrumented routine
	ldr r1, [sp, #20]			@ lr of instrumented routine
@@ -135,7 +135,7 @@ gnu_trace:
	mov lr, pc
	mov lr, pc
	mov pc, r2
	mov pc, r2
	ldmia sp!, {r0-r3, ip, lr}
	ldmia sp!, {r0-r3, ip, lr}
	bx ip
	mov pc, ip


ENTRY(mcount)
ENTRY(mcount)
	stmdb sp!, {r0-r3, lr}
	stmdb sp!, {r0-r3, lr}