aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/dma-noncoherent.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-06 13:39:32 -0800
committerChristoph Hellwig <hch@lst.de>2018-12-13 21:06:18 +0100
commit356da6d0cde3323236977fce54c1f9612a742036 (patch)
tree87ad8176833266fbaa038780d67aebcc490d0d64 /include/linux/dma-noncoherent.h
parentvmd: use the proper dma_* APIs instead of direct methods calls (diff)
downloadwireguard-linux-356da6d0cde3323236977fce54c1f9612a742036.tar.xz
wireguard-linux-356da6d0cde3323236977fce54c1f9612a742036.zip
dma-mapping: bypass indirect calls for dma-direct
Avoid expensive indirect calls in the fast path DMA mapping operations by directly calling the dma_direct_* ops if we are using the directly mapped DMA operations. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/linux/dma-noncoherent.h')
-rw-r--r--include/linux/dma-noncoherent.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h
index 306557331d7d..69b36ed31a99 100644
--- a/include/linux/dma-noncoherent.h
+++ b/include/linux/dma-noncoherent.h
@@ -38,7 +38,10 @@ pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot,
void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
enum dma_data_direction direction);
#else
-#define arch_dma_cache_sync NULL
+static inline void arch_dma_cache_sync(struct device *dev, void *vaddr,
+ size_t size, enum dma_data_direction direction)
+{
+}
#endif /* CONFIG_DMA_NONCOHERENT_CACHE_SYNC */
#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE