linux-mips
[Top] [All Lists]

[PATCH] Use correct dma flushing in dma_cache_sync()

To: linux-mips@linux-mips.org
Subject: [PATCH] Use correct dma flushing in dma_cache_sync()
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Date: Tue, 27 Nov 2007 19:31:33 +0100 (CET)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Not cache coherent R10k systems (like IP28) need to do real cache
invalidates in dma_cache_sync().

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---

diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 33519ce..5cd94a8 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -364,7 +364,7 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t 
size,
        BUG_ON(direction == DMA_NONE);
 
        if (!plat_device_is_coherent(dev))
-               dma_cache_wback_inv((unsigned long)vaddr, size);
+               __dma_sync((unsigned long)vaddr, size, direction);
 }
 
 EXPORT_SYMBOL(dma_cache_sync);

<Prev in Thread] Current Thread [Next in Thread>