فهرست منبع

[PATCH] powerpc: correct cacheflush loop in zImage

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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering 19 سال پیش
والد
کامیت
eacb1962d4
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      arch/powerpc/boot/crt0.S

+ 3 - 2
arch/powerpc/boot/crt0.S

@@ -45,7 +45,8 @@ _zimage_start:
 	bdnz	2b
 	bdnz	2b
 
 
 	/* Do a cache flush for our text, in case OF didn't */
 	/* 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
 	add	r9,r0,r9
 	lis	r8,_etext@ha
 	lis	r8,_etext@ha
 	addi	r8,r8,_etext@l
 	addi	r8,r8,_etext@l
@@ -53,7 +54,7 @@ _zimage_start:
 4:	dcbf	r0,r9
 4:	dcbf	r0,r9
 	icbi	r0,r9
 	icbi	r0,r9
 	addi	r9,r9,0x20
 	addi	r9,r9,0x20
-	cmplwi	0,r9,8
+	cmplw	cr0,r9,r8
 	blt	4b
 	blt	4b
 	sync
 	sync
 	isync
 	isync