X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Flib%2Fmemcpy.S;h=a526c62cb76a90626d6461b31be1000f2858af38;hb=c0bc8721b8d0380ec69fa97578c91201201b05a9;hp=a78865f76547848d3cc1a1b495e6a6360dfc79ff;hpb=abf914208a1e120446ea4f9bc26406bd3a4579e1;p=linux-2.6-omap-h63xx.git diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index a78865f7654..a526c62cb76 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S @@ -12,7 +12,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