+Index: linux-2.6.25.4/arch/mips/mm/c-r4k.c
+===================================================================
+--- linux-2.6.25.4.orig/arch/mips/mm/c-r4k.c
++++ linux-2.6.25.4/arch/mips/mm/c-r4k.c
+@@ -484,7 +484,7 @@ static inline void local_r4k_flush_cache
+ * Use kmap_coherent or kmap_atomic to do flushes for
+ * another ASID than the current one.
+ */
+- if (cpu_has_dc_aliases)
++ if (cpu_has_dc_aliases && cpu_use_kmap_coherent)
+ vaddr = kmap_coherent(page, addr);
+ else
+ vaddr = kmap_atomic(page, KM_USER0);
+@@ -505,7 +505,7 @@ static inline void local_r4k_flush_cache
+ }
+
+ if (vaddr) {
+- if (cpu_has_dc_aliases)
++ if (cpu_has_dc_aliases && cpu_use_kmap_coherent)
+ kunmap_coherent();
+ else
+ kunmap_atomic(vaddr, KM_USER0);