linux-mips
[Top] [All Lists]

[patch] malta bus error

To: linux-mips@linux-mips.org
Subject: [patch] malta bus error
From: Greg Weeks <greg.weeks@timesys.com>
Date: Tue, 05 Apr 2005 15:28:27 -0400
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
Here's the ugly hack I used to get around the bus error on the malta board because of the memcpy prefetch bug. I'm still looking at the memcpy.S code to figure out how to get it to stop prefetching past the end of the copy.

Signed-off-by: Greg Weeks <greg.weeks@timesys.com>


--- mips/arch/mips/Kconfig-orig
+++ mips/arch/mips/Kconfig

@@ -46,6 +46,7 @@
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_LITTLE_ENDIAN
+        select BOARD_HAS_MEMCPY_PREFETCH_BUG
        help
          This enables support for the MIPS Technologies Malta evaluation
          board.
@@ -777,6 +778,10 @@
 config CPU_HAS_PREFETCH
        bool
 
+config BOARD_HAS_MEMCPY_PREFETCH_BUG
+       bool
+       default n
+
 config SB1_PASS_1_WORKAROUNDS
        bool
        depends on CPU_SB1_PASS_1

--- mips/arch/mips/lib/memcpy.S-orig
+++ mips/arch/mips/lib/memcpy.S

@@ -17,6 +17,11 @@
 #include <asm/offset.h>
 #include <asm/regdef.h>
 
+#ifdef CONFIG_BOARD_HAS_MEMCPY_PREFETCH_BUG
+#undef PREF
+#define PREF(hint,addr)
+#endif
+       
 #define dst a0
 #define src a1
 #define len a2
<Prev in Thread] Current Thread [Next in Thread>
  • [patch] malta bus error, Greg Weeks <=