Commit 617667ba authored by Ralf Baechle's avatar Ralf Baechle

[MIPS] Avoid dupliate D-cache flush on R400C / R4400 SC and MC variants.

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 0550d9d1
...@@ -381,17 +381,21 @@ static inline void local_r4k_flush_cache_mm(void * args) ...@@ -381,17 +381,21 @@ static inline void local_r4k_flush_cache_mm(void * args)
if (!cpu_context(smp_processor_id(), mm)) if (!cpu_context(smp_processor_id(), mm))
return; return;
r4k_blast_dcache();
/* /*
* Kludge alert. For obscure reasons R4000SC and R4400SC go nuts if we * Kludge alert. For obscure reasons R4000SC and R4400SC go nuts if we
* only flush the primary caches but R10000 and R12000 behave sane ... * only flush the primary caches but R10000 and R12000 behave sane ...
* R4000SC and R4400SC indexed S-cache ops also invalidate primary
* caches, so we can bail out early.
*/ */
if (current_cpu_data.cputype == CPU_R4000SC || if (current_cpu_data.cputype == CPU_R4000SC ||
current_cpu_data.cputype == CPU_R4000MC || current_cpu_data.cputype == CPU_R4000MC ||
current_cpu_data.cputype == CPU_R4400SC || current_cpu_data.cputype == CPU_R4400SC ||
current_cpu_data.cputype == CPU_R4400MC) current_cpu_data.cputype == CPU_R4400MC) {
r4k_blast_scache(); r4k_blast_scache();
return;
}
r4k_blast_dcache();
} }
static void r4k_flush_cache_mm(struct mm_struct *mm) static void r4k_flush_cache_mm(struct mm_struct *mm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment