diff options
-rw-r--r-- | arch/sh/mm/pg-mmu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/sh/mm/pg-mmu.c b/arch/sh/mm/pg-mmu.c index 027c4d83fb8e..7a6ef34bd499 100644 --- a/arch/sh/mm/pg-mmu.c +++ b/arch/sh/mm/pg-mmu.c | |||
@@ -22,13 +22,14 @@ static pte_t *kmap_coherent_pte; | |||
22 | 22 | ||
23 | void __init kmap_coherent_init(void) | 23 | void __init kmap_coherent_init(void) |
24 | { | 24 | { |
25 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) | ||
26 | unsigned long vaddr; | 25 | unsigned long vaddr; |
27 | 26 | ||
27 | if (!boot_cpu_data.dcache.n_aliases) | ||
28 | return; | ||
29 | |||
28 | /* cache the first coherent kmap pte */ | 30 | /* cache the first coherent kmap pte */ |
29 | vaddr = __fix_to_virt(FIX_CMAP_BEGIN); | 31 | vaddr = __fix_to_virt(FIX_CMAP_BEGIN); |
30 | kmap_coherent_pte = kmap_get_fixmap_pte(vaddr); | 32 | kmap_coherent_pte = kmap_get_fixmap_pte(vaddr); |
31 | #endif | ||
32 | } | 33 | } |
33 | 34 | ||
34 | static void *kmap_coherent(struct page *page, unsigned long addr) | 35 | static void *kmap_coherent(struct page *page, unsigned long addr) |