-Index: linux-2.6.22-rc5/arch/mips/mm/c-r4k.c
-===================================================================
---- linux-2.6.22-rc5.orig/arch/mips/mm/c-r4k.c 2007-06-27 23:40:45.883543848 +0200
-+++ linux-2.6.22-rc5/arch/mips/mm/c-r4k.c 2007-06-27 23:42:06.682260576 +0200
-@@ -339,7 +339,7 @@
-
- static void r4k_flush_cache_all(void)
- {
-- if (!cpu_has_dc_aliases)
-+ if (!cpu_has_dc_aliases || !cpu_use_kmap_coherent)
- return;
-
- r4k_on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1);
-@@ -380,7 +380,7 @@
- static void r4k_flush_cache_range(struct vm_area_struct *vma,
- unsigned long start, unsigned long end)
- {
-- if (!cpu_has_dc_aliases)
-+ if (!cpu_has_dc_aliases || !cpu_use_kmap_coherent)
- return;
-
- r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
-@@ -412,7 +412,7 @@
-
- static void r4k_flush_cache_mm(struct mm_struct *mm)
- {
-- if (!cpu_has_dc_aliases)
-+ if (!cpu_has_dc_aliases || !cpu_use_kmap_coherent)
- return;
-
- r4k_on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1);