diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2014-11-05 08:25:37 +0000 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2014-12-10 17:15:27 +0000 |
commit | f2b0e8bf6c107ff463a96ec53f4dc37ea8d824e2 (patch) | |
tree | 81aac94f3db224f09803bf1db488dda6cf717d61 /arch/mips | |
parent | 67f3e840478e431dbcbc752170656f067f073f3b (diff) | |
download | linux-stable-f2b0e8bf6c107ff463a96ec53f4dc37ea8d824e2.tar.gz linux-stable-f2b0e8bf6c107ff463a96ec53f4dc37ea8d824e2.tar.bz2 linux-stable-f2b0e8bf6c107ff463a96ec53f4dc37ea8d824e2.zip |
MIPS: r4kcache: Add EVA case for protected_writeback_dcache_line
commit 83fd43449baaf88fe5c03dd0081a062041837c51 upstream.
Commit de8974e3f76c0 ("MIPS: asm: r4kcache: Add EVA cache flushing
functions") added cache function for EVA using the cachee instruction.
However, it didn't add a case for the protected_writeback_dcache_line.
mips_dsemul() calls r4k_flush_cache_sigtramp() which in turn uses
the protected_writeback_dcache_line() to flush the trampoline code
back to memory. This used the wrong "cache" instruction leading to
random userland crashes on non-FPU cores.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8331/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/r4kcache.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/include/asm/r4kcache.h b/arch/mips/include/asm/r4kcache.h index 0b8bd28a0df1..ed038d7c3410 100644 --- a/arch/mips/include/asm/r4kcache.h +++ b/arch/mips/include/asm/r4kcache.h @@ -254,7 +254,11 @@ static inline void protected_flush_icache_line(unsigned long addr) */ static inline void protected_writeback_dcache_line(unsigned long addr) { +#ifdef CONFIG_EVA + protected_cachee_op(Hit_Writeback_Inv_D, addr); +#else protected_cache_op(Hit_Writeback_Inv_D, addr); +#endif } static inline void protected_writeback_scache_line(unsigned long addr) |