Commit 7df8818d authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc64: fix memset

This 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: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 26123e88
......@@ -66,13 +66,12 @@ _GLOBAL(strlen)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment