diff options
Diffstat (limited to 'arch/mips/mm/c-r4k.c')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 53ec05267a98..2c4f7e11f0d5 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -364,20 +364,23 @@ static inline int has_valid_asid(const struct mm_struct *mm) | |||
364 | static inline void local_r4k_flush_cache_range(void * args) | 364 | static inline void local_r4k_flush_cache_range(void * args) |
365 | { | 365 | { |
366 | struct vm_area_struct *vma = args; | 366 | struct vm_area_struct *vma = args; |
367 | int exec = vma->vm_flags & VM_EXEC; | ||
367 | 368 | ||
368 | if (!(has_valid_asid(vma->vm_mm))) | 369 | if (!(has_valid_asid(vma->vm_mm))) |
369 | return; | 370 | return; |
370 | 371 | ||
371 | r4k_blast_dcache(); | 372 | r4k_blast_dcache(); |
373 | if (exec) | ||
374 | r4k_blast_icache(); | ||
372 | } | 375 | } |
373 | 376 | ||
374 | static void r4k_flush_cache_range(struct vm_area_struct *vma, | 377 | static void r4k_flush_cache_range(struct vm_area_struct *vma, |
375 | unsigned long start, unsigned long end) | 378 | unsigned long start, unsigned long end) |
376 | { | 379 | { |
377 | if (!cpu_has_dc_aliases) | 380 | int exec = vma->vm_flags & VM_EXEC; |
378 | return; | ||
379 | 381 | ||
380 | r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); | 382 | if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) |
383 | r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); | ||
381 | } | 384 | } |
382 | 385 | ||
383 | static inline void local_r4k_flush_cache_mm(void * args) | 386 | static inline void local_r4k_flush_cache_mm(void * args) |