Re: [RFT 4/5] drm/msm: Convert iommu map/unmap to helpers
From: Karl Mehltretter
Date: Wed Oct 07 2026 - 01:23:46 EST
> By passing NULL for iotlb_gather, does this bypass the IOMMU driver's TLB
> gathering and flushing mechanism?
Yes. On arm64 QEMU/SMMUv3, unmap_pages(..., NULL) returned 4096 after
device DMA populated the IOTLB, but the next DMA still reached the old
page. It faulted after an explicit IOTLB flush.
Using iommu_unmap() invalidated the translation:
return iommu_unmap(domain, iova, pgsize * pgcount);
> It appears this replaces iommu_map_sgtable() with a call to __do_map(),
> but there is no declaration or definition of __do_map() available.
>
> [...]
>
> Similar to the mapping path, is __do_unmap() actually defined?
Patch 3 defines both helpers. msm_iommu.o builds with all five patches.
Karl