From: Leonid Yegoshin Date: Mon, 19 Jun 2017 15:50:10 +0000 (+0200) Subject: MIPS: R6: Fix PREF instruction usage by memcpy for MIPS R6 X-Git-Tag: v5.15~10832^2~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3daf281f2ce3b80cc1abf04f355f066e37f69451;p=platform%2Fkernel%2Flinux-starfive.git MIPS: R6: Fix PREF instruction usage by memcpy for MIPS R6 Disable usage of PREF instruction usage by memcpy for MIPS R6. MIPS R6 redefines PREF instruction with smaller offset than ordinary MIPS. However, the memcpy code uses PREF instruction with offsets bigger than +-256 bytes. Malta kernels already disable usage of PREF for memcpy. This was found during adaptation of MIPS R6 for virtual board used by Android emulator. Signed-off-by: Leonid Yegoshin Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: James.Hogan@imgtec.com Cc: Paul.Burton@imgtec.com Cc: Raghu.Gandham@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: Douglas.Leung@imgtec.com Cc: Petar.Jovanovic@imgtec.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16510/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index 3114a2e..03e3304 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S @@ -28,6 +28,9 @@ #ifdef CONFIG_MIPS_MALTA #undef CONFIG_CPU_HAS_PREFETCH #endif +#ifdef CONFIG_CPU_MIPSR6 +#undef CONFIG_CPU_HAS_PREFETCH +#endif #include #include