From a1a47d3c57e3bc3c49bc1eca94c00eba4880d2c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Wed, 1 Dec 2010 00:58:34 +0100 Subject: arm: relocate_code(): do not set register useless MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- arch/arm/cpu/armv7/start.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/cpu/armv7/start.S') diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index fe98235..0cb5f34 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -166,14 +166,14 @@ stack_setup: mov sp, r4 adr r0, _start - ldr r2, _TEXT_BASE - ldr r3, _bss_start_ofs - add r2, r0, r3 /* r2 <- source end address */ - mov r1, r6 /* r1 <- scratch for copy_loop */ cmp r0, r6 #ifndef CONFIG_PRELOADER beq jump_2_ram #endif + 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 */ copy_loop: ldmia r0!, {r9-r10} /* copy from source address [r0] */ -- cgit v1.1