summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-10-20 22:55:26 +0100
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 19:32:50 +0100
commite5adb8770e12169a6595a3ad5682541441bd1052 (patch)
tree22aaae4e58f9d4054a474a5fa31d492e4b9e79a1 /arch
parent7cf8053b8ee48a7f0e9d8ebc72c279fb2e168c25 (diff)
downloadlinux-3.10-e5adb8770e12169a6595a3ad5682541441bd1052.tar.gz
linux-3.10-e5adb8770e12169a6595a3ad5682541441bd1052.tar.bz2
linux-3.10-e5adb8770e12169a6595a3ad5682541441bd1052.zip
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. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/lib/memcpy.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S
index a78865f7654..7f9aafa4d80 100644
--- a/arch/mips/lib/memcpy.S
+++ b/arch/mips/lib/memcpy.S
@@ -13,6 +13,21 @@
* 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>