Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d88e61fa authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Joerg Roedel
Browse files

iommu: Remove the ->map_sg indirection



All iommu drivers use the default_iommu_map_sg implementation, and there
is no good reason to ever override it.  Just expose it as iommu_map_sg
directly and remove the indirection, specially in our post-spectre world
where indirect calls are horribly expensive.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 58d11317
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3192,7 +3192,6 @@ const struct iommu_ops amd_iommu_ops = {
	.detach_dev = amd_iommu_detach_device,
	.map = amd_iommu_map,
	.unmap = amd_iommu_unmap,
	.map_sg = default_iommu_map_sg,
	.iova_to_phys = amd_iommu_iova_to_phys,
	.add_device = amd_iommu_add_device,
	.remove_device = amd_iommu_remove_device,
+0 −1
Original line number Diff line number Diff line
@@ -1997,7 +1997,6 @@ static struct iommu_ops arm_smmu_ops = {
	.attach_dev		= arm_smmu_attach_dev,
	.map			= arm_smmu_map,
	.unmap			= arm_smmu_unmap,
	.map_sg			= default_iommu_map_sg,
	.flush_iotlb_all	= arm_smmu_iotlb_sync,
	.iotlb_sync		= arm_smmu_iotlb_sync,
	.iova_to_phys		= arm_smmu_iova_to_phys,
+0 −1
Original line number Diff line number Diff line
@@ -1562,7 +1562,6 @@ static struct iommu_ops arm_smmu_ops = {
	.attach_dev		= arm_smmu_attach_dev,
	.map			= arm_smmu_map,
	.unmap			= arm_smmu_unmap,
	.map_sg			= default_iommu_map_sg,
	.flush_iotlb_all	= arm_smmu_iotlb_sync,
	.iotlb_sync		= arm_smmu_iotlb_sync,
	.iova_to_phys		= arm_smmu_iova_to_phys,
+0 −1
Original line number Diff line number Diff line
@@ -1332,7 +1332,6 @@ static const struct iommu_ops exynos_iommu_ops = {
	.detach_dev = exynos_iommu_detach_device,
	.map = exynos_iommu_map,
	.unmap = exynos_iommu_unmap,
	.map_sg = default_iommu_map_sg,
	.iova_to_phys = exynos_iommu_iova_to_phys,
	.device_group = generic_device_group,
	.add_device = exynos_iommu_add_device,
+0 −1
Original line number Diff line number Diff line
@@ -5308,7 +5308,6 @@ const struct iommu_ops intel_iommu_ops = {
	.detach_dev		= intel_iommu_detach_device,
	.map			= intel_iommu_map,
	.unmap			= intel_iommu_unmap,
	.map_sg			= default_iommu_map_sg,
	.iova_to_phys		= intel_iommu_iova_to_phys,
	.add_device		= intel_iommu_add_device,
	.remove_device		= intel_iommu_remove_device,
Loading