mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: akpm@osdl.org
Cc: torvalds@osdl.org, anton@samba.org, linux-kernel@vger.kernel.org
Subject: [PATCH][PPC64] Fix memset
Date: Tue, 29 Jun 2004 18:35:56 +1000	[thread overview]
Message-ID: <16609.10732.623109.866800@cargo.ozlabs.ibm.com> (raw)

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

                 reply	other threads:[~2004-06-29  8:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16609.10732.623109.866800@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®