All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: sparclinux@vger.kernel.org
Subject: [4/3] fix initrd memcpy
Date: Tue, 21 Dec 2004 04:56:27 +0000	[thread overview]
Message-ID: <20041221045627.GC771@holomorphy.com> (raw)

The latter hunk of the forwarded patch has already been applied, so
please apply the patch as it appears in the un-forwarded part. I've
taken some liberties in adding the Acked/Signed-off lines in what I
hope is an agreeable way.

On Sun, Nov 14, 2004 at 11:16:40PM -0500, Jurij Smakov wrote:
> As a followup: I have tried fiddling more with the memcpy() routine.
> Insight from Rob Radez and comments in arch/sparc/lib/blockops.S suggest,
> that __copy_1page assumes that the memory regions copied are aligned on a
> double-word boundary. I have checked, that in the cramfs case it wasn't
> true, the destination was not aligned on the double-word boundary. So, I
> have implemented a simple workaround (see patch below), which together
> with Bob Breuer's iommu.c fix [0] made 2.6.8 kernel to boot on my
> machine (SS10 with Ross Hypersparc CPU)! I also confirm, that adding the
> suggested fix to the srmmu.c also [1] breaks sunlance on my machine. With
> that "fix" the line 'eth0: Memory error, status 88c3, addr 3713ba' is
> displayed continuously during boot, when it comes to configuring network
> interfaces. The successful patch for me is:

Acked-by: William Irwin  <wli@holomorphy.com>
Acked-by: Dave Miller  <davem@davemloft.net>
Signed-off-by: Jurij Smakov <jurij@wooyd.org>

Index: sparc32-2.6.10-rc3/include/asm-sparc/string.h
=================================--- sparc32-2.6.10-rc3.orig/include/asm-sparc/string.h	2004-06-15 22:18:38.000000000 -0700
+++ sparc32-2.6.10-rc3/include/asm-sparc/string.h	2004-12-20 20:53:00.585527010 -0800
@@ -40,6 +40,9 @@
 
 	if(n <= 32) {
 		__builtin_memcpy(to, from, n);
+	} else if (((unsigned int) to & 7) != 0) {
+		/* Destination is not aligned on the double-word boundary */
+		__memcpy(to, from, n);
 	} else {
 		switch(n) {
 		case PAGE_SIZE:

             reply	other threads:[~2004-12-21  4:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-21  4:56 William Lee Irwin III [this message]
2004-12-21  6:28 ` [4/3] fix initrd memcpy David S. Miller
2004-12-21  6:39 ` William Lee Irwin III
2004-12-21  7:00 ` William Lee Irwin III
2004-12-21  7:58 ` David S. Miller
2004-12-21  8:28 ` William Lee Irwin III

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=20041221045627.GC771@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=sparclinux@vger.kernel.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 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.