aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/c-tx39.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mm/c-tx39.c')
-rw-r--r--arch/mips/mm/c-tx39.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c
index f32ebde30ccf..560a6de96556 100644
--- a/arch/mips/mm/c-tx39.c
+++ b/arch/mips/mm/c-tx39.c
@@ -128,7 +128,6 @@ static inline void tx39_flush_cache_all(void)
128 return; 128 return;
129 129
130 tx39_blast_dcache(); 130 tx39_blast_dcache();
131 tx39_blast_icache();
132} 131}
133 132
134static inline void tx39___flush_cache_all(void) 133static inline void tx39___flush_cache_all(void)
@@ -142,24 +141,19 @@ static void tx39_flush_cache_mm(struct mm_struct *mm)
142 if (!cpu_has_dc_aliases) 141 if (!cpu_has_dc_aliases)
143 return; 142 return;
144 143
145 if (cpu_context(smp_processor_id(), mm) != 0) { 144 if (cpu_context(smp_processor_id(), mm) != 0)
146 tx39_flush_cache_all(); 145 tx39_blast_dcache();
147 }
148} 146}
149 147
150static void tx39_flush_cache_range(struct vm_area_struct *vma, 148static void tx39_flush_cache_range(struct vm_area_struct *vma,
151 unsigned long start, unsigned long end) 149 unsigned long start, unsigned long end)
152{ 150{
153 int exec; 151 if (!cpu_has_dc_aliases)
154 152 return;
155 if (!(cpu_context(smp_processor_id(), vma->vm_mm))) 153 if (!(cpu_context(smp_processor_id(), vma->vm_mm)))
156 return; 154 return;
157 155
158 exec = vma->vm_flags & VM_EXEC; 156 tx39_blast_dcache();
159 if (cpu_has_dc_aliases || exec)
160 tx39_blast_dcache();
161 if (exec)
162 tx39_blast_icache();
163} 157}
164 158
165static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) 159static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn)
@@ -218,7 +212,7 @@ static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page
218 212
219static void local_tx39_flush_data_cache_page(void * addr) 213static void local_tx39_flush_data_cache_page(void * addr)
220{ 214{
221 tx39_blast_dcache_page(addr); 215 tx39_blast_dcache_page((unsigned long)addr);
222} 216}
223 217
224static void tx39_flush_data_cache_page(unsigned long addr) 218static void tx39_flush_data_cache_page(unsigned long addr)