iommu: Move iotlb_sync_map out from __iommu_map
authorYong Wu <yong.wu@mediatek.com>
Thu, 7 Jan 2021 12:29:03 +0000 (20:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:03 +0000 (11:38 +0100)
commit452fc2c9bbf2fdb4b9cfc3c7aa150275bd439b32
treec46441254df6a354afa9847362f7203b1da9b551
parent910990a6075adeeb2a9492ee9017fde2611ac114
iommu: Move iotlb_sync_map out from __iommu_map

[ Upstream commit d8c1df02ac7f2c802a9b2afc0f5c888c4217f1d5 ]

In the end of __iommu_map, It alway call iotlb_sync_map.

This patch moves iotlb_sync_map out from __iommu_map since it is
unnecessary to call this for each sg segment especially iotlb_sync_map
is flush tlb all currently. Add a little helper _iommu_map for this.

Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210107122909.16317-2-yong.wu@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/iommu.c