aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/cpu/pxa
diff options
context:
space:
mode:
authorAndreas Bie├čmann <andreas.devel@googlemail.com>2010-12-01 00:58:34 +0100
committerWolfgang Denk <wd@denx.de>2010-12-09 11:01:15 +0100
commita1a47d3c57e3bc3c49bc1eca94c00eba4880d2c3 (patch)
tree0f17f75076e1a8c6ee7d868c3924722a7c803f15 /arch/arm/cpu/pxa
parenta78fb68f718383ba7eea410340be66e94cd3540d (diff)
downloadu-boot-linaro-stable-a1a47d3c57e3bc3c49bc1eca94c00eba4880d2c3.tar.gz
arm: relocate_code(): do not set register useless
In case we are still at relocation target address before relocation we do not need to load the registers needed for relocation. We should instead skip the whole relocation part and jump over to clear_bss immediately. Signed-off-by: Andreas Bie▀mann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/arm/cpu/pxa')
-rw-r--r--arch/arm/cpu/pxa/start.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index 7e1c6e62a..53391ec30 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -244,12 +244,12 @@ stack_setup:
mov sp, r4
adr r0, _start
+ cmp r0, r6
+ beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r2, _TEXT_BASE
ldr r3, _bss_start_ofs
add r2, r0, r3 /* r2 <- source end address */
- cmp r0, r6
- beq clear_bss
stmfd sp!, {r0-r12}
copy_loop: