diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2011-10-06 03:55:00 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-24 16:39:56 -0500 |
commit | d3864767a85b13e0e0ecc5f4284f65cc26252446 (patch) | |
tree | 19090a7d35b94ef612fe085d87567f4005616b25 /arch/mips | |
parent | 3c06b12b046e426200d016dbdb1e3e81ffb1c185 (diff) |
mips/ide: flush dcache also if icache does not snoop dcache
If this is not done then the new just read data which remains in dcache
will not make it into icache on time. Thus the CPU loads invalid data
and executes crap. The result is that the user is not able to execute
anything from its IDE based media while reading plain data is still
working well.
This problem has been reported as Debian #404951
http://bugs.debian.org/404951
http://comments.gmane.org/gmane.linux.ide/45092
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/2820/
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/mach-generic/ide.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/include/asm/mach-generic/ide.h b/arch/mips/include/asm/mach-generic/ide.h index affa66f5c2da..4ae5fbcb15a5 100644 --- a/arch/mips/include/asm/mach-generic/ide.h +++ b/arch/mips/include/asm/mach-generic/ide.h | |||
@@ -23,7 +23,7 @@ | |||
23 | static inline void __ide_flush_prologue(void) | 23 | static inline void __ide_flush_prologue(void) |
24 | { | 24 | { |
25 | #ifdef CONFIG_SMP | 25 | #ifdef CONFIG_SMP |
26 | if (cpu_has_dc_aliases) | 26 | if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc) |
27 | preempt_disable(); | 27 | preempt_disable(); |
28 | #endif | 28 | #endif |
29 | } | 29 | } |
@@ -31,14 +31,14 @@ static inline void __ide_flush_prologue(void) | |||
31 | static inline void __ide_flush_epilogue(void) | 31 | static inline void __ide_flush_epilogue(void) |
32 | { | 32 | { |
33 | #ifdef CONFIG_SMP | 33 | #ifdef CONFIG_SMP |
34 | if (cpu_has_dc_aliases) | 34 | if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc) |
35 | preempt_enable(); | 35 | preempt_enable(); |
36 | #endif | 36 | #endif |
37 | } | 37 | } |
38 | 38 | ||
39 | static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size) | 39 | static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size) |
40 | { | 40 | { |
41 | if (cpu_has_dc_aliases) { | 41 | if (cpu_has_dc_aliases || !cpu_has_ic_fills_f_dc) { |
42 | unsigned long end = addr + size; | 42 | unsigned long end = addr + size; |
43 | 43 | ||
44 | while (addr < end) { | 44 | while (addr < end) { |