From 574b9d91e6b60bb1cd09abc1d76de757b5450e6d Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 20 Oct 2005 22:55:26 +0100 Subject: [PATCH] --- yaml --- r: 11286 b: refs/heads/master c: e5adb8770e12169a6595a3ad5682541441bd1052 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/lib/memcpy.S | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0bd0f5e4d5b6..7283ffee4e44 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7cf8053b8ee48a7f0e9d8ebc72c279fb2e168c25 +refs/heads/master: e5adb8770e12169a6595a3ad5682541441bd1052 diff --git a/trunk/arch/mips/lib/memcpy.S b/trunk/arch/mips/lib/memcpy.S index a78865f76547..7f9aafa4d80e 100644 --- a/trunk/arch/mips/lib/memcpy.S +++ b/trunk/arch/mips/lib/memcpy.S @@ -13,6 +13,21 @@ * Mnemonic names for arguments to memcpy/__copy_user */ #include + +/* + * 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 #include #include