Hack to resolve longstanding prefetch issue
authorRalf Baechle <ralf@linux-mips.org>
Thu, 20 Oct 2005 21:55:26 +0000 (22:55 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:32:50 +0000 (19:32 +0100)
Prefetching may be fatal on some systems if we're prefetching beyond the
end of memory on some systems.  It's also a seriously bad idea on non
dma-coherent systems.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/lib/memcpy.S

index a78865f76547848d3cc1a1b495e6a6360dfc79ff..7f9aafa4d80e56eed12497964c2118072a86bc1a 100644 (file)
  * Mnemonic names for arguments to memcpy/__copy_user
  */
 #include <linux/config.h>
+
+/*
+ * Hack to resolve longstanding prefetch issue
+ *
+ * Prefetching may be fatal on some systems if we're prefetching beyond the
+ * end of memory on some systems.  It's also a seriously bad idea on non
+ * dma-coherent systems.
+ */
+#if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
+#undef CONFIG_CPU_HAS_PREFETCH
+#endif
+#ifdef CONFIG_MIPS_MALTA
+#undef CONFIG_CPU_HAS_PREFETCH
+#endif
+
 #include <asm/asm.h>
 #include <asm/asm-offsets.h>
 #include <asm/regdef.h>