ARM: fix setup_c when runtime offset is != 0
The runtime offset has to be added to the memcpy source address and
substracted from the return address. This should have been changed in
a43e2bbc46 which changed from returning the negative runtime offset
into changing the positive runtime offset. Instead a43e2bbc46 only
changed a zero substraction ("subs r4, r0, #0") into a zero addition
("adds r4, r0, #0") which was used as a equal to zero test and changed
nothing. This part is reverted here.

Fixes wrong copy / return locations when setup_c is called with
different runtime and link addresses.

fixes: a43e2bbc46 ("ARM: return positive offset in get_runtime_offset()")

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 8047705 commit 0230365df6601cd561c9e3e368c96222076ec9f5
@Sascha Hauer Sascha Hauer authored on 12 Dec 2018
Showing 1 changed file
View
arch/arm/cpu/setupc.S