Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [patch] malta bus error
@ 2005-04-05 19:28 Greg Weeks
  0 siblings, 0 replies; only message in thread
From: Greg Weeks @ 2005-04-05 19:28 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

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>



[-- Attachment #2: malta.memcpy.prefetch.hack.patch --]
[-- Type: text/x-patch, Size: 778 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-05 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-05 19:28 [patch] malta bus error Greg Weeks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox