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@xxxxxxxxxxx>
--- 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