Skip to content

Commit

Permalink
sh: Bail from kmap_coherent_init() if we have no dcache aliases.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Aug 15, 2009
1 parent d2dcd91 commit 8edcfcb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/sh/mm/pg-mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8edcfcb

Please sign in to comment.