Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] TX39: Remove redundant tx39_blast_icache() calls

Apply commit 0550d9d13e02b30efa117d47fcadea450bb23d23 to c-tx39.c too.
And fix a warning in local_tx39_flush_data_cache_page().

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Atsushi Nemoto and committed by
Ralf Baechle
a5664c40 0a22e0d4

+6 -12
+6 -12
arch/mips/mm/c-tx39.c
··· 128 128 return; 129 129 130 130 tx39_blast_dcache(); 131 - tx39_blast_icache(); 132 131 } 133 132 134 133 static inline void tx39___flush_cache_all(void) ··· 141 142 if (!cpu_has_dc_aliases) 142 143 return; 143 144 144 - if (cpu_context(smp_processor_id(), mm) != 0) { 145 - tx39_flush_cache_all(); 146 - } 145 + if (cpu_context(smp_processor_id(), mm) != 0) 146 + tx39_blast_dcache(); 147 147 } 148 148 149 149 static void tx39_flush_cache_range(struct vm_area_struct *vma, 150 150 unsigned long start, unsigned long end) 151 151 { 152 - int exec; 153 - 152 + if (!cpu_has_dc_aliases) 153 + return; 154 154 if (!(cpu_context(smp_processor_id(), vma->vm_mm))) 155 155 return; 156 156 157 - exec = vma->vm_flags & VM_EXEC; 158 - if (cpu_has_dc_aliases || exec) 159 - tx39_blast_dcache(); 160 - if (exec) 161 - tx39_blast_icache(); 157 + tx39_blast_dcache(); 162 158 } 163 159 164 160 static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) ··· 212 218 213 219 static void local_tx39_flush_data_cache_page(void * addr) 214 220 { 215 - tx39_blast_dcache_page(addr); 221 + tx39_blast_dcache_page((unsigned long)addr); 216 222 } 217 223 218 224 static void tx39_flush_data_cache_page(unsigned long addr)