diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-03-04 10:41:39 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-06 19:07:16 -0500 |
commit | a5664c40750ce423f308dfd01ad4e82ecb7ac127 (patch) | |
tree | 1cb488a1df4b927562fb5523e162bae3220f87ce | |
parent | 0a22e0d43b6d6468544dd7559d5f3c4acb8b536e (diff) |
[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>
-rw-r--r-- | arch/mips/mm/c-tx39.c | 18 |
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 | ||
134 | static inline void tx39___flush_cache_all(void) | 133 | static 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 | ||
150 | static void tx39_flush_cache_range(struct vm_area_struct *vma, | 148 | static 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 | ||
165 | static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) | 159 | static 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 | ||
219 | static void local_tx39_flush_data_cache_page(void * addr) | 213 | static 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 | ||
224 | static void tx39_flush_data_cache_page(unsigned long addr) | 218 | static void tx39_flush_data_cache_page(unsigned long addr) |