iommu: Remove detach_dev callbacks
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 10 Jan 2023 02:54:04 +0000 (10:54 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 13 Jan 2023 15:39:14 +0000 (16:39 +0100)
commit1b932ceddd19de1cdf2a86f1fca77c37dad758cc
tree386e13de2bfa6c04917c0261e6331d9c5aa0f741
parentb7bfaa761d760e72a969d116517eaa12e404c262
iommu: Remove detach_dev callbacks

The iommu core calls the driver's detach_dev domain op callback only when
a device is finished assigning to user space and
iommu_group_release_dma_owner() is called to return the device to the
kernel, where iommu core wants to set the default domain to the device but
the driver didn't provide one.

In other words, if any iommu driver provides default domain support, the
.detach_dev callback will never be called. This removes the detach_dev
callbacks in those IOMMU drivers that support default domain.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Sven Peter <sven@svenpeter.dev> # apple-dart
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com> # sprd
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> # amd
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230110025408.667767-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c
drivers/iommu/apple-dart.c
drivers/iommu/arm/arm-smmu/qcom_iommu.c
drivers/iommu/exynos-iommu.c
drivers/iommu/ipmmu-vmsa.c
drivers/iommu/mtk_iommu.c
drivers/iommu/rockchip-iommu.c
drivers/iommu/sprd-iommu.c
drivers/iommu/sun50i-iommu.c