MIPS: tlb-r4k: If there are wired entries, don't use TLBINVF
[cascardo/linux.git] / arch / mips / mm / tlb-r4k.c
index e8b335c..4953c1a 100644 (file)
@@ -67,8 +67,11 @@ void local_flush_tlb_all(void)
 
        entry = read_c0_wired();
 
-       /* Blast 'em all away. */
-       if (cpu_has_tlbinv) {
+       /*
+        * Blast 'em all away.
+        * If there are any wired entries, fall back to iterating
+        */
+       if (cpu_has_tlbinv && !entry) {
                if (current_cpu_data.tlbsizevtlb) {
                        write_c0_index(0);
                        mtc0_tlbw_hazard();