iommu: Add set_platform_dma_ops callbacks
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 10 Jan 2023 02:54:06 +0000 (10:54 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 13 Jan 2023 15:39:16 +0000 (16:39 +0100)
commitc1fe9119ee707459421d8f7387e803b0ea78c21b
tree66cc77a650c53be6a209d162ccabb5b3f0d8735a
parent6caeb33fa986151f745fc62190bc28a593b8a0d2
iommu: Add set_platform_dma_ops callbacks

For those IOMMU drivers that don't provide default domain support, add an
implementation of set_platform_dma_ops callback so that the IOMMU core
could return the DMA control to platform DMA ops. At the same time, with
the set_platform_dma_ops implemented, there is no need for detach_dev.
Remove it to avoid dead code.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230110025408.667767-4-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/fsl_pamu_domain.c
drivers/iommu/msm_iommu.c
drivers/iommu/mtk_iommu_v1.c
drivers/iommu/omap-iommu.c
drivers/iommu/s390-iommu.c
drivers/iommu/tegra-gart.c
drivers/iommu/tegra-smmu.c