linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] correct cacheflush loop in zImage
@ 2006-03-04 12:15 Olaf Hering
  2006-03-04 12:58 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2006-03-04 12:15 UTC (permalink / raw)
  To: Paul Mackeras, linuxppc-dev


Correct the loop for cacheflush. No idea where I copied the code from,
but the original does not work correct. Maybe the flush is not needed.

Signed-off-by: Olaf Hering <olh@suse.de>

 arch/powerpc/boot/crt0.S |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6.16-rc5-olh/arch/powerpc/boot/crt0.S
===================================================================
--- linux-2.6.16-rc5-olh.orig/arch/powerpc/boot/crt0.S
+++ linux-2.6.16-rc5-olh/arch/powerpc/boot/crt0.S
@@ -45,7 +45,8 @@ _zimage_start:
 	bdnz	2b
 
 	/* Do a cache flush for our text, in case OF didn't */
-3:	lis	r9,_start@h
+3:	lis	r9,_start@ha
+	addi	r9,r9,_start@l
 	add	r9,r0,r9
 	lis	r8,_etext@ha
 	addi	r8,r8,_etext@l
@@ -53,7 +54,7 @@ _zimage_start:
 4:	dcbf	r0,r9
 	icbi	r0,r9
 	addi	r9,r9,0x20
-	cmplwi	0,r9,8
+	cmplw	cr0,r9,r8
 	blt	4b
 	sync
 	isync

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] correct cacheflush loop in zImage
  2006-03-04 12:15 [PATCH] correct cacheflush loop in zImage Olaf Hering
@ 2006-03-04 12:58 ` Olaf Hering
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Hering @ 2006-03-04 12:58 UTC (permalink / raw)
  To: Paul Mackeras, linuxppc-dev

 On Sat, Mar 04, Olaf Hering wrote:

> 
> Correct the loop for cacheflush. No idea where I copied the code from,
> but the original does not work correct. Maybe the flush is not needed.
> 
> Signed-off-by: Olaf Hering <olh@suse.de>
> 
>  arch/powerpc/boot/crt0.S |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6.16-rc5-olh/arch/powerpc/boot/crt0.S
> ===================================================================
> --- linux-2.6.16-rc5-olh.orig/arch/powerpc/boot/crt0.S
> +++ linux-2.6.16-rc5-olh/arch/powerpc/boot/crt0.S
> @@ -45,7 +45,8 @@ _zimage_start:
>  	bdnz	2b
>  
>  	/* Do a cache flush for our text, in case OF didn't */
> -3:	lis	r9,_start@h
> +3:	lis	r9,_start@ha
> +	addi	r9,r9,_start@l
>  	add	r9,r0,r9

I think this part is not required. Segments must be 64k aligned, so the
lower bits will be always zero (modulo the _start offset into .text)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-04 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-04 12:15 [PATCH] correct cacheflush loop in zImage Olaf Hering
2006-03-04 12:58 ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).