Re: [RFT 4/5] drm/msm: Convert iommu map/unmap to helpers
From: Rob Clark
Date: Wed Oct 07 2026 - 11:17:46 EST
On Tue, Oct 6, 2026 at 10:23 PM Karl Mehltretter <kmehltretter@xxxxxxxxx> wrote:
>
> > 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.
Sashiko is kinda funny sometimes :-)
BR,
-R