Skip to contentSkip to conversation

armv7: Fix to mistake clean the memory space

PATCH New Zhong Hongbo 3 participants 9 messages Jul 6, 2012 – Jul 7, 2012 1 message not in the archive Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

---
 arch/arm/cpu/arm1136/start.S   |    8 +++++---
 arch/arm/cpu/arm1176/start.S   |    8 +++++---
 arch/arm/cpu/arm720t/start.S   |    8 +++++---
 arch/arm/cpu/arm920t/start.S   |    8 +++++---
 arch/arm/cpu/arm925t/start.S   |    8 +++++---
 arch/arm/cpu/arm946es/start.S  |    8 +++++---
 arch/arm/cpu/arm_intcm/start.S |    8 +++++---
 arch/arm/cpu/armv7/start.S     |    8 +++++---
 arch/arm/cpu/ixp/start.S       |    8 +++++---
 arch/arm/cpu/lh7a40x/start.S   |    8 +++++---
 arch/arm/cpu/pxa/start.S       |    8 +++++---
 arch/arm/cpu/s3c44b0/start.S   |    8 +++++---
 arch/arm/cpu/sa1100/start.S    |    8 +++++---
 13 files changed, 65 insertions(+), 39 deletions(-)
arch/arm/cpu/arm1136/start.S +5 -3
index c0db96c..2483c63 100644
@@ -251,10 +251,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 #endif	/* #ifndef CONFIG_SPL_BUILD */
 
 /*
arch/arm/cpu/arm1176/start.S +5 -3
index 848144a..7b5cf19 100644
@@ -351,10 +351,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 #ifndef CONFIG_NAND_SPL
 	bl coloured_LED_init
arch/arm/cpu/arm720t/start.S +5 -3
index 540e3c2..3b97e80 100644
@@ -228,10 +228,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 	bl coloured_LED_init
 	bl red_led_on
arch/arm/cpu/arm920t/start.S +5 -3
index 8c5612c..9b8604e 100644
@@ -271,10 +271,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 	bl coloured_LED_init
 	bl red_led_on
arch/arm/cpu/arm925t/start.S +5 -3
index dbb93ef..1a54416 100644
@@ -265,10 +265,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 	bl coloured_LED_init
 	bl red_led_on
arch/arm/cpu/arm946es/start.S +5 -3
index 89ba558..b4d1d2d 100644
@@ -236,10 +236,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	blo	clbss_l
+	b	clbss_l
+clbss_e:
 #endif
 
 /*
arch/arm/cpu/arm_intcm/start.S +5 -3
index 2033b36..b85e7d4 100644
@@ -232,10 +232,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 	bl coloured_LED_init
 	bl red_led_on
arch/arm/cpu/armv7/start.S +5 -3
index 22a3ced..aee27fd 100644
@@ -259,10 +259,12 @@ clear_bss:
 #endif
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 /*
  * We are done. Do not return, instead branch to second part of board
arch/arm/cpu/ixp/start.S +5 -3
index cb32121..59c359a 100644
@@ -334,10 +334,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 	bl coloured_LED_init
 	bl red_led_on
arch/arm/cpu/lh7a40x/start.S +5 -3
index 62de8b8..bd68cd4 100644
@@ -245,10 +245,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 #endif
 
 /*
arch/arm/cpu/pxa/start.S +5 -3
index ba0de8f..33c73f6 100644
@@ -258,10 +258,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 #endif	/* #ifndef CONFIG_SPL_BUILD */
 
 /*
arch/arm/cpu/s3c44b0/start.S +5 -3
index a29d5b4..8daf26c 100644
@@ -217,10 +217,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 
 	bl coloured_LED_init
 	bl red_led_on
arch/arm/cpu/sa1100/start.S +5 -3
index 92546d8..bcea2a8 100644
@@ -221,10 +221,12 @@ clear_bss:
 	add	r1, r1, r4
 	mov	r2, #0x00000000		/* clear			    */
 
-clbss_l:str	r2, [r0]		/* clear loop...		    */
+clbss_l:cmp	r0, r1			/* clear loop... */
+	bhs	clbss_e			/* if reached end of bss, exit */
+	str	r2, [r0]
 	add	r0, r0, #4
-	cmp	r0, r1
-	bne	clbss_l
+	b	clbss_l
+clbss_e:
 #endif
 
 /*
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Quoted 10 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

well this is wrong, I would maybe ack it.

Quoted 2 lines

---

Some more formal things ...

This is the third version of this type of patch. Therefore it should have a version history here and some version information in the subject ([PATCH v3] maybe). Please read http://www.denx.de/wiki/view/U-Boot/Patches
especially
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions

BTW: The content looks sane.

Best regards

Andreas Bie?mann

#2 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Quoted 6 lines · Andreas Bie?mann
Quoted 5 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

Quoted 7 lines
Quoted 5 lines

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

well this is wrong, I would maybe ack it

Ok

Quoted 4 lines
Quoted 3 lines

---

Quoted 8 lines

Some more formal things ...

This is the third version of this type of patch. Therefore it should have a version history here and some version information in the subject ([PATCH v3] maybe). Please read http://www.denx.de/wiki/view/U-Boot/Patches
especially
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions

Thanks, I just see the format of patch. I will add the version information to the next review.

Quoted 2 lines

BTW: The content looks sane.

I will send v3 for this.

Thanks,
hongbo

Quoted 5 lines

Best regards

Andreas Bie?mann

#3 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Dear Zhong Hongbo,

Quoted 10 lines · Zhong Hongbo
Quoted 9 lines · Andreas Bie?mann
Quoted 8 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

well this is wrong, I would maybe ack it

Ok

After sending I doubt my statement was correct, but I found a source
http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags

Quoted 13 lines
Quoted 4 lines
Quoted 3 lines

---

Quoted 8 lines

Some more formal things ...

This is the third version of this type of patch. Therefore it should have a version history here and some version information in the subject ([PATCH v3] maybe). Please read http://www.denx.de/wiki/view/U-Boot/Patches
especially
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions

Quoted 7 lines

Thanks, I just see the format of patch. I will add the version information to the next review.

Quoted 2 lines

BTW: The content looks sane.

I will send v3 for this.

a last formal thing to mention: The subject should (now) say 'arm: ...' not 'armv7: ...'.

Best regards

Andreas Bie?mann

#4 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Quoted 16 lines · Andreas Bie?mann

Dear Zhong Hongbo,

Quoted 13 lines · Zhong Hongbo
Quoted 12 lines · Andreas Bie?mann
Quoted 10 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

well this is wrong, I would maybe ack it

Ok

After sending I doubt my statement was correct, but I found a source
http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags

he, Ye, I think we(You, Albert and me) are involved in the development of the patch.

Quoted 17 lines
Quoted 17 lines
Quoted 5 lines
Quoted 4 lines

---

Quoted 8 lines

Some more formal things ...

This is the third version of this type of patch. Therefore it should have a version history here and some version information in the subject ([PATCH v3] maybe). Please read http://www.denx.de/wiki/view/U-Boot/Patches
especially
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions

Thanks, I just see the format of patch. I will add the version information to the next review.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

BTW: The content looks sane.

I will send v3 for this.

a last formal thing to mention: The subject should (now) say 'arm: ...' not 'armv7: ...'.

Ok.

Thanks,
hongbo

Quoted 6 lines

Best regards

Andreas Bie?mann

#5 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Hi Zhong Hongbo,

Quoted 19 lines · Zhong Hongbo
Quoted 18 lines · Andreas Bie?mann

Dear Zhong Hongbo,

Quoted 15 lines · Zhong Hongbo
Quoted 13 lines · Andreas Bie?mann
Quoted 10 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

well this is wrong, I would maybe ack it

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Ok

After sending I doubt my statement was correct, but I found a source
http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags

he, Ye, I think we(You, Albert and me) are involved in the development of the patch.

It could be said of any reviewer that they are "involved in the development of the patch", yet not all reviewers's Signed-off-by is added to evey patch they review. There is a Reviewed-by tag for reviewers.

I personally do not consider it would make sense to have my Signed-off-by on this patch.

Amicalement,

Signature · 1 line
Albert.
#6 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Quoted 31 lines · Albert ARIBAUD

Hi Zhong Hongbo,

Quoted 19 lines · Zhong Hongbo
Quoted 18 lines · Andreas Bie?mann

Dear Zhong Hongbo,

Quoted 15 lines · Zhong Hongbo
Quoted 13 lines · Andreas Bie?mann
Quoted 10 lines · Zhong Hongbo

From: Zhong Hongbo <[email protected]>

In currently, when __bss_start is equal to __bss_end__, The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__, we do the clear bss section operation.

well this is wrong, I would maybe ack it

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Ok

After sending I doubt my statement was correct, but I found a source
http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags

he, Ye, I think we(You, Albert and me) are involved in the development of the patch.

Quoted 7 lines

It could be said of any reviewer that they are "involved in the development of the patch", yet not all reviewers's Signed-off-by is added to evey patch they review. There is a Reviewed-by tag for reviewers.

I personally do not consider it would make sense to have my Signed-off-by on this patch.

Ok, I am doing the patch.

Thanks,
hongbo

Quoted 3 lines

Amicalement,

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Dear Zhong Hongbo,

Am Freitag, 6. Juli 2012 schrieb Zhong Hongbo :

    On 07/06/2012 09:57 PM, Andreas Bie?mann wrote:
    > Dear Zhong Hongbo,
    >
    > On 06.07.2012 15:50, Zhong Hongbo wrote:
    >> On 07/06/2012 09:23 PM, Andreas Bie?mann wrote:
    >>> On 06.07.2012 14:20, Zhong Hongbo wrote:
    >>>> From: Zhong Hongbo <[email protected] <javascript:;>>
    >>>>
    >>>> In currently, when __bss_start is equal to __bss_end__,
    >>>> The bss loop will clear all the things in memory space.
    >>>>
    >>>> But just only when __bss_end__ greater than __bss_start__,
    >>>> we do the clear bss section operation.
    >>>>
    >>>> Signed-off-by: Hongbo Zhong <[email protected] <javascript:;>>
    >>>> Signed-off-by: Andreas Bie?mann <[email protected]
    <javascript:;>>
    >>>
    >>> well this is wrong, I would maybe ack it
    Hi Andreas,

    How I do it? Signed-off-by or Reviewed-by?

you do not need to put these lines in at all, the reviewer will reply your mail with the correct line (Acked-by, Reviewed-by, Tested-by) in it. A tool called patchwork will then provide some convenience for the custodians. He just pulls the mbox file from patchwork which has all the collected lines in it. The resulting commit in the custodian repository will contain all these linesgathered while in review process. You ought to put some other people on cc so they can review the patch. This can easily achieved by putting a 'cc: <some email>' into the patch. Git will then put these addresses on cc automagicly.

Best regards

Andreas Bie?mann

#9 lore raw

PATCH 1/1 armv7: Fix to mistake clean the memory space

Quoted 28 lines · Andreas Bie?mann

Dear Zhong Hongbo,

Am Freitag, 6. Juli 2012 schrieb Zhong Hongbo :

    On 07/06/2012 09:57 PM, Andreas Bie?mann wrote:
    > Dear Zhong Hongbo,
    >
    > On 06.07.2012 15:50, Zhong Hongbo wrote:
    >> On 07/06/2012 09:23 PM, Andreas Bie?mann wrote:
    >>> On 06.07.2012 14:20, Zhong Hongbo wrote:
    >>>> From: Zhong Hongbo <[email protected] <javascript:;>>
    >>>>
    >>>> In currently, when __bss_start is equal to __bss_end__,
    >>>> The bss loop will clear all the things in memory space.
    >>>>
    >>>> But just only when __bss_end__ greater than __bss_start__,
    >>>> we do the clear bss section operation.
    >>>>
    >>>> Signed-off-by: Hongbo Zhong <[email protected] <javascript:;>>
    >>>> Signed-off-by: Andreas Bie?mann <[email protected]
    <javascript:;>>
    >>>
    >>> well this is wrong, I would maybe ack it
    Hi Andreas,

    How I do it? Signed-off-by or Reviewed-by?
Quoted 9 lines

you do not need to put these lines in at all, the reviewer will reply your mail with the correct line (Acked-by, Reviewed-by, Tested-by) in it. A tool called patchwork will then provide some convenience for the custodians. He just pulls the mbox file from patchwork which has all the collected lines in it. The resulting commit in the custodian repository will contain all these linesgathered while in review process. You ought to put some other people on cc so they can review the patch. This can easily achieved by putting a 'cc: <some email>' into the patch. Git will then put these addresses on cc automagicly.

Ok,

Thanks,
hongbo

Quoted 6 lines

Best regards

Andreas Bie?mann