From 5bdac5f2716fa850f9aa400892b9416bfeaa301c Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sat, 26 May 2012 04:43:29 +0000 Subject: [PATCH] --- yaml --- r: 309540 b: refs/heads/master c: 95835335a3c187f418e86b453e1716cb5aad17be h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/sparc/kernel/ioport.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index aa30335fb050..9b35aa836665 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 87e677c4122e732dd1f7142ba7b2d4823576a199 +refs/heads/master: 95835335a3c187f418e86b453e1716cb5aad17be diff --git a/trunk/arch/sparc/kernel/ioport.c b/trunk/arch/sparc/kernel/ioport.c index 8bc4db01af32..f00945bed1b9 100644 --- a/trunk/arch/sparc/kernel/ioport.c +++ b/trunk/arch/sparc/kernel/ioport.c @@ -55,17 +55,13 @@ const struct sparc32_dma_ops *sparc32_dma_ops; /* This function must make sure that caches and memory are coherent after DMA * On LEON systems without cache snooping it flushes the entire D-CACHE. */ -#ifndef CONFIG_SPARC_LEON static inline void dma_make_coherent(unsigned long pa, unsigned long len) { + if (sparc_cpu_model == sparc_leon) { + if (!sparc_leon3_snooping_enabled()) + leon_flush_dcache_all(); + } } -#else -static inline void dma_make_coherent(unsigned long pa, unsigned long len) -{ - if (!sparc_leon3_snooping_enabled()) - leon_flush_dcache_all(); -} -#endif static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,