Skip to content

Commit 8edcfcb

Browse files
committed
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>
1 parent d2dcd91 commit 8edcfcb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎arch/sh/mm/pg-mmu.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ static pte_t *kmap_coherent_pte;
2222

2323
void __init kmap_coherent_init(void)
2424
{
25-
#if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)
2625
unsigned long vaddr;
2726

27+
if (!boot_cpu_data.dcache.n_aliases)
28+
return;
29+
2830
/* cache the first coherent kmap pte */
2931
vaddr = __fix_to_virt(FIX_CMAP_BEGIN);
3032
kmap_coherent_pte = kmap_get_fixmap_pte(vaddr);
31-
#endif
3233
}
3334

3435
static void *kmap_coherent(struct page *page, unsigned long addr)

0 commit comments

Comments
 (0)