* [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush dcache for LEONs without snooping enabled.
@ 2011-01-18 14:10 Kristoffer Glembo
2011-01-18 19:40 ` [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush Sam Ravnborg
2011-01-22 0:51 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Kristoffer Glembo @ 2011-01-18 14:10 UTC (permalink / raw)
To: sparclinux
Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
---
arch/sparc/kernel/ioport.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index b817481..815003b 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,
--
1.6.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush
2011-01-18 14:10 [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush dcache for LEONs without snooping enabled Kristoffer Glembo
@ 2011-01-18 19:40 ` Sam Ravnborg
2011-01-22 0:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2011-01-18 19:40 UTC (permalink / raw)
To: sparclinux
On Tue, Jan 18, 2011 at 03:10:27PM +0100, Kristoffer Glembo wrote:
> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Looks OK to me.
But I do not know enough about the background to add
my "Acked-by:" as this imply some knowledge about the code touched.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush
2011-01-18 14:10 [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush dcache for LEONs without snooping enabled Kristoffer Glembo
2011-01-18 19:40 ` [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush Sam Ravnborg
@ 2011-01-22 0:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2011-01-22 0:51 UTC (permalink / raw)
To: sparclinux
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 18 Jan 2011 20:40:53 +0100
> On Tue, Jan 18, 2011 at 03:10:27PM +0100, Kristoffer Glembo wrote:
>> Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
>
> Looks OK to me.
> But I do not know enough about the background to add
> my "Acked-by:" as this imply some knowledge about the code touched.
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-22 0:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 14:10 [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush dcache for LEONs without snooping enabled Kristoffer Glembo
2011-01-18 19:40 ` [PATCH 4/6 V3] sparc/leon: Make mmu_inval_dma_area flush Sam Ravnborg
2011-01-22 0:51 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.