]> git.ipfire.org Git - thirdparty/linux.git/commit
iommu/dma: implement DMA_ATTR_MMIO for dma_iova_link().
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 9 Sep 2025 13:27:30 +0000 (16:27 +0300)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 11 Sep 2025 22:08:07 +0000 (00:08 +0200)
commitc288d657dd5151199d6629c11a940fee33fdd0bd
tree2253b765ca32e6fe748b053b63debff34bfc1aba
parenteadaa8b255f36ee39ca97d0815c25eeeb1f5d674
iommu/dma: implement DMA_ATTR_MMIO for dma_iova_link().

This will replace the hacky use of DMA_ATTR_SKIP_CPU_SYNC to avoid
touching the possibly non-KVA MMIO memory.

Also correct the incorrect caching attribute for the IOMMU, MMIO
memory should not be cachable inside the IOMMU mapping or it can
possibly create system problems. Set IOMMU_MMIO for DMA_ATTR_MMIO.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/17ba63991aeaf8a80d5aca9ba5d028f1daa58f62.1757423202.git.leonro@nvidia.com
drivers/iommu/dma-iommu.c