diff options
author | Yong Wu <yong.wu@mediatek.com> | 2021-01-07 20:29:08 +0800 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-01-27 12:32:27 +0000 |
commit | f21ae3b100840c1439fb326841f24641cf3de4a1 (patch) | |
tree | 4f9b2e53c0cf0855471bc0aef4378616da4f06ba /mm/mlock.c | |
parent | 77e0992aee4e980e8c553e512a5dfa3e704cf030 (diff) |
iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once
In current iommu_unmap, this code is:
iommu_iotlb_gather_init(&iotlb_gather);
ret = __iommu_unmap(domain, iova, size, &iotlb_gather);
iommu_iotlb_sync(domain, &iotlb_gather);
We could gather the whole iova range in __iommu_unmap, and then do tlb
synchronization in the iommu_iotlb_sync.
This patch implement this, Gather the range in mtk_iommu_unmap.
then iommu_iotlb_sync call tlb synchronization for the gathered iova range.
we don't call iommu_iotlb_gather_add_page since our tlb synchronization
could be regardless of granule size.
In this way, gather->start is impossible ULONG_MAX, remove the checking.
This patch aims to do tlb synchronization *once* in the iommu_unmap.
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-7-yong.wu@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'mm/mlock.c')
0 files changed, 0 insertions, 0 deletions