diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-07 00:39:32 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-13 23:06:18 +0300 |
commit | 356da6d0cde3323236977fce54c1f9612a742036 (patch) | |
tree | 87ad8176833266fbaa038780d67aebcc490d0d64 /include/linux/dma-noncoherent.h | |
parent | 190d4e5916a2d70a11009022b968fca948fb5dc7 (diff) | |
download | linux-356da6d0cde3323236977fce54c1f9612a742036.tar.xz |
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.h | 5 |
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 |