Fix memset
PATCH 1/1 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 <[email protected]>
arch/ppc64/lib/string.S +1 -2
@@ -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