diff options
author | Dave Airlie <airlied@redhat.com> | 2018-07-20 10:34:24 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-07-20 10:34:33 +1000 |
commit | 090cbdd0735b3752a9dd2e4008e585acd661c67d (patch) | |
tree | bc482cd47d9d860e469bfebbacbe4b78f7dd2db4 /arch/arm/mm/dma-mapping.c | |
parent | 539c475dadc430bd0f1601902fcacc1e55ffe85a (diff) | |
parent | d00ddd9da79a868264997e192f9404aef1e46ba8 (diff) | |
download | talos-op-linux-090cbdd0735b3752a9dd2e4008e585acd661c67d.tar.gz talos-op-linux-090cbdd0735b3752a9dd2e4008e585acd661c67d.zip |
Merge branch 'linux-4.19' of git://github.com/skeggsb/linux into drm-next
misc fixes and cleanups for next.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv55CfRonQ0bo2XiitkCiWTjKwhsP=+ZFhoa-BaJ72Ryew@mail.gmail.com
Diffstat (limited to 'arch/arm/mm/dma-mapping.c')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index be0fa7e39c26..ba0e786c952e 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1151,6 +1151,11 @@ int arm_dma_supported(struct device *dev, u64 mask) return __dma_supported(dev, mask, false); } +static const struct dma_map_ops *arm_get_dma_map_ops(bool coherent) +{ + return coherent ? &arm_coherent_dma_ops : &arm_dma_ops; +} + #ifdef CONFIG_ARM_DMA_USE_IOMMU static int __dma_info_to_prot(enum dma_data_direction dir, unsigned long attrs) @@ -2296,7 +2301,7 @@ void arm_iommu_detach_device(struct device *dev) iommu_detach_device(mapping->domain, dev); kref_put(&mapping->kref, release_iommu_mapping); to_dma_iommu_mapping(dev) = NULL; - set_dma_ops(dev, NULL); + set_dma_ops(dev, arm_get_dma_map_ops(dev->archdata.dma_coherent)); pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); } @@ -2357,11 +2362,6 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) { } #endif /* CONFIG_ARM_DMA_USE_IOMMU */ -static const struct dma_map_ops *arm_get_dma_map_ops(bool coherent) -{ - return coherent ? &arm_coherent_dma_ops : &arm_dma_ops; -} - void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu, bool coherent) { |