summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2005-01-01 17:47:34 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-01 17:47:34 -0800
commit3515356afde822a0fa7c8261e623659639c5065d (patch)
tree4ac6564a8dce3104df801285920c76f8dec01848 /include
parent693c84fdaf03e73c5a441d5fed662f52216a17d9 (diff)
[PATCH] sparc32: fix initrd memcpy problem
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc/string.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-sparc/string.h b/include/asm-sparc/string.h
index 1182435f4163..312304d248b9 100644
--- a/include/asm-sparc/string.h
+++ b/include/asm-sparc/string.h
@@ -40,6 +40,9 @@ static inline void *__constant_memcpy(void *to, const void *from, __kernel_size_
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: