[U-Boot] [PATCH v2 3/4] arm: do not compile relocate_code() for SPL builds

2013-05-14 Thread Albert ARIBAUD
Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v2:
- dropped all relocate_code instances from SPL builds

 arch/arm/cpu/arm1136/start.S   |   11 +++
 arch/arm/cpu/arm1176/start.S   |   11 +--
 arch/arm/cpu/arm720t/start.S   |   11 +--
 arch/arm/cpu/arm920t/start.S   |   12 +---
 arch/arm/cpu/arm925t/start.S   |   11 +--
 arch/arm/cpu/arm926ejs/start.S |   11 +++
 arch/arm/cpu/arm946es/start.S  |   11 +--
 arch/arm/cpu/arm_intcm/start.S |   11 +--
 arch/arm/cpu/armv7/start.S |6 ++
 arch/arm/cpu/ixp/start.S   |   11 +--
 arch/arm/cpu/pxa/start.S   |8 ++--
 arch/arm/cpu/s3c44b0/start.S   |   11 +--
 arch/arm/cpu/sa1100/start.S|   11 +--
 13 files changed, 55 insertions(+), 81 deletions(-)

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index ccea2d5..1eec2e0 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -104,10 +104,6 @@ _TEXT_BASE:
 _bss_start_ofs:
.word __bss_start - _start
 
-.globl _image_copy_end_ofs
-_image_copy_end_ofs:
-   .word __image_copy_end - _start
-
 .globl _bss_end_ofs
 _bss_end_ofs:
.word __bss_end - _start
@@ -173,6 +169,7 @@ next:
 
 
/*--*/
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * void relocate_code(addr_moni)
  *
@@ -195,7 +192,6 @@ copy_loop:
cmp r0, r2  /* until source end address [r2]*/
blo copy_loop
 
-#ifndef CONFIG_SPL_BUILD
/*
 * fix .rel.dyn relocations
 */
@@ -233,14 +229,13 @@ fixnext:
add r2, r2, #8  /* each rel.dyn entry is 8 bytes */
cmp r2, r3
blo fixloop
-#endif
 
 relocate_done:
 
bx  lr
 
-#ifndef CONFIG_SPL_BUILD
-
+_image_copy_end_ofs:
+   .word __image_copy_end - _start
 _rel_dyn_start_ofs:
.word __rel_dyn_start - _start
 _rel_dyn_end_ofs:
diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index f20da8e..3c2a52c 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -112,10 +112,6 @@ _TEXT_BASE:
 _bss_start_ofs:
.word __bss_start - _start
 
-.globl _image_copy_end_ofs
-_image_copy_end_ofs:
-   .word __image_copy_end - _start
-
 .globl _bss_end_ofs
 _bss_end_ofs:
.word __bss_end - _start
@@ -225,6 +221,7 @@ skip_tcmdisable:
 
 
/*--*/
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * void relocate_code(addr_moni)
  *
@@ -247,7 +244,6 @@ copy_loop:
cmp r0, r2  /* until source end address [r2]*/
blo copy_loop
 
-#ifndef CONFIG_SPL_BUILD
/*
 * fix .rel.dyn relocations
 */
@@ -285,12 +281,13 @@ fixnext:
add r2, r2, #8  /* each rel.dyn entry is 8 bytes */
cmp r2, r3
blo fixloop
-#endif
 
 relocate_done:
 
bx  lr
 
+_image_copy_end_ofs:
+   .word __image_copy_end - _start
 _rel_dyn_start_ofs:
.word __rel_dyn_start - _start
 _rel_dyn_end_ofs:
@@ -298,6 +295,8 @@ _rel_dyn_end_ofs:
 _dynsym_start_ofs:
.word __dynsym_start - _start
 
+#endif
+
.globl  c_runtime_cpu_setup
 c_runtime_cpu_setup:
 
diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S
index 9facc7e..983f8ad 100644
--- a/arch/arm/cpu/arm720t/start.S
+++ b/arch/arm/cpu/arm720t/start.S
@@ -101,10 +101,6 @@ _TEXT_BASE:
 _bss_start_ofs:
.word __bss_start - _start
 
-.globl _image_copy_end_ofs
-_image_copy_end_ofs:
-   .word __image_copy_end - _start
-
 .globl _bss_end_ofs
 _bss_end_ofs:
.word __bss_end - _start
@@ -155,6 +151,7 @@ reset:
 
 
/*--*/
 
+#ifndef CONFIG_SPL_BUILD
 /*
  * void relocate_code(addr_moni)
  *
@@ -177,7 +174,6 @@ copy_loop:
cmp r0, r2  /* until source end address [r2]*/
blo copy_loop
 
-#ifndef CONFIG_SPL_BUILD
/*
 * fix .rel.dyn relocations
 */
@@ -215,12 +211,13 @@ fixnext:
add r2, r2, #8  /* each rel.dyn entry is 8 bytes */
cmp r2, r3
blo fixloop
-#endif
 
 relocate_done:
 
mov pc, lr
 
+_image_copy_end_ofs:
+   .word __image_copy_end - _start
 _rel_dyn_start_ofs:
.word __rel_dyn_start - _start
 _rel_dyn_end_ofs:
@@ -228,6 +225,8 @@ _rel_dyn_end_ofs:
 _dynsym_start_ofs:
.word __dynsym_start - _start
 
+#endif
+
.globl  c_runtime_cpu_setup
 c_runtime_cpu_setup:
 
diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
index 6250025..889329f 100644
--- a/arch/arm/cpu/arm920t/start.S
+++ b/arch/arm/cpu/arm920t/start.S
@@ -89,10 +89,6 @@ _TEXT_BASE:
 _bss_start_ofs:
.word __bss_start - _start
 
-.globl 

Re: [U-Boot] [PATCH v2 3/4] arm: do not compile relocate_code() for SPL builds

2013-05-14 Thread Benoît Thébaudeau
Hi Albert,

On Tuesday, May 14, 2013 11:50:29 AM, Albert ARIBAUD wrote:
 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 ---
 Changes in v2:
 - dropped all relocate_code instances from SPL builds
 
  arch/arm/cpu/arm1136/start.S   |   11 +++
  arch/arm/cpu/arm1176/start.S   |   11 +--
  arch/arm/cpu/arm720t/start.S   |   11 +--
  arch/arm/cpu/arm920t/start.S   |   12 +---
  arch/arm/cpu/arm925t/start.S   |   11 +--
  arch/arm/cpu/arm926ejs/start.S |   11 +++
  arch/arm/cpu/arm946es/start.S  |   11 +--
  arch/arm/cpu/arm_intcm/start.S |   11 +--
  arch/arm/cpu/armv7/start.S |6 ++
  arch/arm/cpu/ixp/start.S   |   11 +--
  arch/arm/cpu/pxa/start.S   |8 ++--
  arch/arm/cpu/s3c44b0/start.S   |   11 +--
  arch/arm/cpu/sa1100/start.S|   11 +--
  13 files changed, 55 insertions(+), 81 deletions(-)
 
 diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
 index ccea2d5..1eec2e0 100644
 --- a/arch/arm/cpu/arm1136/start.S
 +++ b/arch/arm/cpu/arm1136/start.S
 @@ -104,10 +104,6 @@ _TEXT_BASE:
  _bss_start_ofs:
   .word __bss_start - _start
  
 -.globl _image_copy_end_ofs
 -_image_copy_end_ofs:
 - .word __image_copy_end - _start
 -

This change should be mentioned in the commit message, or moved to a separate
patch.

[...]

Best regards,
Benoît
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/4] arm: do not compile relocate_code() for SPL builds

2013-05-14 Thread Albert ARIBAUD
Hi Benoît,

On Tue, 14 May 2013 17:21:51 +0200 (CEST), Benoît Thébaudeau
benoit.thebaud...@advansee.com wrote:

 Hi Albert,
 
 On Tuesday, May 14, 2013 11:50:29 AM, Albert ARIBAUD wrote:
  Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
  ---
  Changes in v2:
  - dropped all relocate_code instances from SPL builds
  
   arch/arm/cpu/arm1136/start.S   |   11 +++
   arch/arm/cpu/arm1176/start.S   |   11 +--
   arch/arm/cpu/arm720t/start.S   |   11 +--
   arch/arm/cpu/arm920t/start.S   |   12 +---
   arch/arm/cpu/arm925t/start.S   |   11 +--
   arch/arm/cpu/arm926ejs/start.S |   11 +++
   arch/arm/cpu/arm946es/start.S  |   11 +--
   arch/arm/cpu/arm_intcm/start.S |   11 +--
   arch/arm/cpu/armv7/start.S |6 ++
   arch/arm/cpu/ixp/start.S   |   11 +--
   arch/arm/cpu/pxa/start.S   |8 ++--
   arch/arm/cpu/s3c44b0/start.S   |   11 +--
   arch/arm/cpu/sa1100/start.S|   11 +--
   13 files changed, 55 insertions(+), 81 deletions(-)
  
  diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
  index ccea2d5..1eec2e0 100644
  --- a/arch/arm/cpu/arm1136/start.S
  +++ b/arch/arm/cpu/arm1136/start.S
  @@ -104,10 +104,6 @@ _TEXT_BASE:
   _bss_start_ofs:
  .word __bss_start - _start
   
  -.globl _image_copy_end_ofs
  -_image_copy_end_ofs:
  -   .word __image_copy_end - _start
  -
 
 This change should be mentioned in the commit message, or moved to a separate
 patch.

This is not a separate change; __image_copy_end_ofs is one of the offset
words used by relocate_code, only for some reason it was not initially
placed with the others at the end of the routine; so instead of putting
a second pair of conditionals around it, I move it where it should have
been in the first place, which also places it within the already added
pair of conditionals.

 Best regards,
 Benoît

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/4] arm: do not compile relocate_code() for SPL builds

2013-05-14 Thread Benoît Thébaudeau
Hi Albert,

On Tuesday, May 14, 2013 6:21:02 PM, Albert ARIBAUD wrote:
 Hi Benoît,
 
 On Tue, 14 May 2013 17:21:51 +0200 (CEST), Benoît Thébaudeau
 benoit.thebaud...@advansee.com wrote:
 
  Hi Albert,
  
  On Tuesday, May 14, 2013 11:50:29 AM, Albert ARIBAUD wrote:
   Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
   ---
   Changes in v2:
   - dropped all relocate_code instances from SPL builds
   
arch/arm/cpu/arm1136/start.S   |   11 +++
arch/arm/cpu/arm1176/start.S   |   11 +--
arch/arm/cpu/arm720t/start.S   |   11 +--
arch/arm/cpu/arm920t/start.S   |   12 +---
arch/arm/cpu/arm925t/start.S   |   11 +--
arch/arm/cpu/arm926ejs/start.S |   11 +++
arch/arm/cpu/arm946es/start.S  |   11 +--
arch/arm/cpu/arm_intcm/start.S |   11 +--
arch/arm/cpu/armv7/start.S |6 ++
arch/arm/cpu/ixp/start.S   |   11 +--
arch/arm/cpu/pxa/start.S   |8 ++--
arch/arm/cpu/s3c44b0/start.S   |   11 +--
arch/arm/cpu/sa1100/start.S|   11 +--
13 files changed, 55 insertions(+), 81 deletions(-)
   
   diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
   index ccea2d5..1eec2e0 100644
   --- a/arch/arm/cpu/arm1136/start.S
   +++ b/arch/arm/cpu/arm1136/start.S
   @@ -104,10 +104,6 @@ _TEXT_BASE:
_bss_start_ofs:
 .word __bss_start - _start

   -.globl _image_copy_end_ofs
   -_image_copy_end_ofs:
   - .word __image_copy_end - _start
   -
  
  This change should be mentioned in the commit message, or moved to a
  separate
  patch.
 
 This is not a separate change; __image_copy_end_ofs is one of the offset
 words used by relocate_code, only for some reason it was not initially
 placed with the others at the end of the routine; so instead of putting
 a second pair of conditionals around it, I move it where it should have
 been in the first place, which also places it within the already added
 pair of conditionals.

OK.

Best regards,
Benoît
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot