aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-08-22 08:15:47 -0400
committerRalf Baechle <ralf@linux-mips.org>2006-11-29 20:14:48 -0500
commit0550d9d13e02b30efa117d47fcadea450bb23d23 (patch)
tree5bfdbe50ebd06b2215fbad9388586bd4106861ec /arch/mips
parente56798824456bd907cefe840ca127df0518942e3 (diff)
[MIPS] Remove redundant r4k_blast_icache() calls
r4k_flush_cache_all() and r4k_flush_cache_mm() case: these are noop if the CPU did not have dc_aliases. It would mean we do not need to care about icache here. r4k_flush_cache_range case: if r4k_flush_cache_mm() did not need to care about icache, it would be same for this function. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/mm/c-r4k.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index cc895dad71d2..0138cb2e456d 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -323,7 +323,6 @@ static void __init r4k_blast_scache_setup(void)
323static inline void local_r4k_flush_cache_all(void * args) 323static inline void local_r4k_flush_cache_all(void * args)
324{ 324{
325 r4k_blast_dcache(); 325 r4k_blast_dcache();
326 r4k_blast_icache();
327} 326}
328 327
329static void r4k_flush_cache_all(void) 328static void r4k_flush_cache_all(void)
@@ -359,21 +358,19 @@ static void r4k___flush_cache_all(void)
359static inline void local_r4k_flush_cache_range(void * args) 358static inline void local_r4k_flush_cache_range(void * args)
360{ 359{
361 struct vm_area_struct *vma = args; 360 struct vm_area_struct *vma = args;
362 int exec;
363 361
364 if (!(cpu_context(smp_processor_id(), vma->vm_mm))) 362 if (!(cpu_context(smp_processor_id(), vma->vm_mm)))
365 return; 363 return;
366 364
367 exec = vma->vm_flags & VM_EXEC; 365 r4k_blast_dcache();
368 if (cpu_has_dc_aliases || exec)
369 r4k_blast_dcache();
370 if (exec)
371 r4k_blast_icache();
372} 366}
373 367
374static void r4k_flush_cache_range(struct vm_area_struct *vma, 368static void r4k_flush_cache_range(struct vm_area_struct *vma,
375 unsigned long start, unsigned long end) 369 unsigned long start, unsigned long end)
376{ 370{
371 if (!cpu_has_dc_aliases)
372 return;
373
377 r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); 374 r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
378} 375}
379 376
@@ -385,7 +382,6 @@ static inline void local_r4k_flush_cache_mm(void * args)
385 return; 382 return;
386 383
387 r4k_blast_dcache(); 384 r4k_blast_dcache();
388 r4k_blast_icache();
389 385
390 /* 386 /*
391 * Kludge alert. For obscure reasons R4000SC and R4400SC go nuts if we 387 * Kludge alert. For obscure reasons R4000SC and R4400SC go nuts if we