]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sh: Bail from kmap_coherent_init() if we have no dcache aliases.
authorPaul Mundt <lethal@linux-sh.org>
Sat, 15 Aug 2009 00:03:59 +0000 (09:03 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Sat, 15 Aug 2009 00:03:59 +0000 (09:03 +0900)
This kills off the ifdef from kmap_coherent_init() and just bails if
there are no cache aliases. This permits the kmap coherent code to be
used on other CPUs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/pg-mmu.c

index 027c4d83fb8e6787e77ce51ddd1fdc0bdde7b3a7..7a6ef34bd499152261b7366ea6d7cbfbe9f0075f 100644 (file)
@@ -22,13 +22,14 @@ static pte_t *kmap_coherent_pte;
 
 void __init kmap_coherent_init(void)
 {
-#if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)
        unsigned long vaddr;
 
+       if (!boot_cpu_data.dcache.n_aliases)
+               return;
+
        /* cache the first coherent kmap pte */
        vaddr = __fix_to_virt(FIX_CMAP_BEGIN);
        kmap_coherent_pte = kmap_get_fixmap_pte(vaddr);
-#endif
 }
 
 static void *kmap_coherent(struct page *page, unsigned long addr)