X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Flib%2Fmemcpy.S;h=a526c62cb76a90626d6461b31be1000f2858af38;hb=c0bc8721b8d0380ec69fa97578c91201201b05a9;hp=90ee8d43261f591d2f509bf10ae7c6981e6bc3b5;hpb=c324b44c34050cf2a9b58830e11c974806bd85d8;p=linux-2.6-omap-h63xx.git diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index 90ee8d43261..a526c62cb76 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S @@ -12,9 +12,23 @@ * * 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 #include #define dst a0