Skip to contentSkip to conversation

sparc: Add NOP dma_cache_sync() implementation.

PATCH New David Miller 1 participant 1 message Nov 26, 2014 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 sparc: Add NOP dma_cache_sync() implementation.

This can be a NOP because we forward dma_{alloc,free}_noncoherent to dma_{alloc,free}_coherent.

---
 arch/sparc/include/asm/dma-mapping.h | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/sparc/include/asm/dma-mapping.h +8 -0
index 5b1b52a..7e064c6 100644
@@ -12,6 +12,14 @@ int dma_supported(struct device *dev, u64 mask);
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
+static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+				  enum dma_data_direction dir)
+{
+	/* Since dma_{alloc,free}_noncoherent() allocated coherent memory, this
+	 * routine can be a nop.
+	 */
+}
+
 extern struct dma_map_ops *dma_ops;
 extern struct dma_map_ops *leon_dma_ops;
 extern struct dma_map_ops pci32_dma_ops;
Signature · 1 line
2.1.2.532.g19b5d50