All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][PPC64] Fix memset
@ 2004-06-29  8:35 Paul Mackerras
  0 siblings, 0 replies; only message in thread
From: Paul Mackerras @ 2004-06-29  8:35 UTC (permalink / raw)
  To: akpm; +Cc: torvalds, anton, linux-kernel

This patch fixes a bug in the ppc64 memset where the code that gets
the destination address aligned (or is supposed to) was looking at the
bottom 3 bits of the count rather than the destination address.  The
result of this was that the kernel wouldn't boot on POWER3 machines.
The patch also removes an unnecessary duplicate instruction.

Signed-off-by: Paul Mackerras <paulus@samba.org>

diff -urN linux-2.5/arch/ppc64/lib/string.S ppc64-2.5-pseries/arch/ppc64/lib/string.S
--- linux-2.5/arch/ppc64/lib/string.S	2004-06-25 07:03:03.000000000 +1000
+++ ppc64-2.5-pseries/arch/ppc64/lib/string.S	2004-06-29 16:26:13.000000000 +1000
@@ -66,13 +66,12 @@
 	blr
 
 _GLOBAL(memset)
-	neg	r0,r5
+	neg	r0,r3
 	rlwimi	r4,r4,8,16,23
 	andi.	r0,r0,7			/* # bytes to be 8-byte aligned */
 	rlwimi	r4,r4,16,0,15
 	cmplw	cr1,r5,r0		/* do we get that far? */
 	rldimi	r4,r4,32,0
-	mr	r6,r3
 	mtcrf	1,r0
 	mr	r6,r3
 	blt	cr1,8f

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-29  8:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-29  8:35 [PATCH][PPC64] Fix memset Paul Mackerras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.