lkml.org 
[lkml]   [2004]   [Jun]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 29 Jun 2004 18:35:56 +1000
FromPaul Mackerras <>
Subject[PATCH][PPC64] Fix memset
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2008