Skip to contentSkip to conversation

Use correct dma flushing in dma_cache_sync()

PATCH In review Thomas Bogendoerfer 2 participants 2 messages Nov 27, 2007 – Nov 28, 2007 MIPS

lore
Share & tools
lore

Thomas Bogendoerfer

author maintainer
#0 lore raw

PATCH 1/1 Use correct dma flushing in dma_cache_sync()

Not cache coherent R10k systems (like IP28) need to do real cache invalidates in dma_cache_sync().

---

arch/mips/mm/dma-default.c +1 -1
index 33519ce..5cd94a8 100644
@@ -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);
#1 lore raw
Quoted 2 lines · Thomas Bogendoerfer

Not cache coherent R10k systems (like IP28) need to do real cache invalidates in dma_cache_sync().

Queued for 2.6.25,

Ralf