summaryrefslogtreecommitdiffstats
path: root/arch/arm64/mm/dma-mapping.c
diff options
context:
space:
mode:
authorChristoph Hellwig2018-12-06 22:39:32 +0100
committerChristoph Hellwig2018-12-13 21:06:18 +0100
commit356da6d0cde3323236977fce54c1f9612a742036 (patch)
tree87ad8176833266fbaa038780d67aebcc490d0d64 /arch/arm64/mm/dma-mapping.c
parentvmd: use the proper dma_* APIs instead of direct methods calls (diff)
downloadkernel-qcow2-linux-356da6d0cde3323236977fce54c1f9612a742036.tar.gz
kernel-qcow2-linux-356da6d0cde3323236977fce54c1f9612a742036.tar.xz
kernel-qcow2-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 'arch/arm64/mm/dma-mapping.c')
-rw-r--r--arch/arm64/mm/dma-mapping.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index ab1e417204d0..95eda81e3f2d 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -462,9 +462,6 @@ static void __iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
const struct iommu_ops *iommu, bool coherent)
{
- if (!dev->dma_ops)
- dev->dma_ops = &dma_direct_ops;
-
dev->dma_coherent = coherent;
__iommu_setup_dma_ops(dev, dma_base, size, iommu);