summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorKristoffer Glembo <kristoffer@gaisler.com>2011-01-18 05:10:27 +0100
committerDavid S. Miller <davem@davemloft.net>2011-03-17 02:18:58 +0100
commit1b19274083d67f66ce3097c8d2bebc22b7911e3f (patch)
tree1b9abc0173ef48c160b2d47d21f2c13ba0c60dae /arch/sparc
parentsparc/leon: Add LEON dma_ops. (diff)
downloadlinux-1b19274083d67f66ce3097c8d2bebc22b7911e3f.tar.xz
linux-1b19274083d67f66ce3097c8d2bebc22b7911e3f.zip
sparc/leon: Make mmu_inval_dma_area flush dcache for LEONs without snooping enabled.
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/ioport.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index b81748119cf7..815003b5fab6 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -50,10 +50,14 @@
#include <asm/io-unit.h>
#include <asm/leon.h>
-#ifdef CONFIG_SPARC_LEON
-#define mmu_inval_dma_area(p, l) leon_flush_dcache_all()
-#else
+#ifndef CONFIG_SPARC_LEON
#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */
+#else
+static inline void mmu_inval_dma_area(unsigned long va, unsigned long len)
+{
+ if (!sparc_leon3_snooping_enabled())
+ leon_flush_dcache_all();
+}
#endif
static struct resource *_sparc_find_resource(struct resource *r,