diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-15 09:03:59 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-15 09:03:59 +0900 |
commit | 8edcfcbbd131a3580db666ed1034c24d56eb6f5d (patch) | |
tree | dcbf87a13227e846a2eec6ea7026de2424947c7b /arch/sh | |
parent | d2dcd9101b1a940ce8496601ba871e47f84881ec (diff) | |
download | blackbird-op-linux-8edcfcbbd131a3580db666ed1034c24d56eb6f5d.tar.gz blackbird-op-linux-8edcfcbbd131a3580db666ed1034c24d56eb6f5d.zip |
sh: Bail from kmap_coherent_init() if we have no dcache aliases.
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>
Diffstat (limited to 'arch/sh')
-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; 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) |