Thread (67 messages) 67 messages, 2 authors, 2023-08-16

Re: [PATCH v6 25/25] iommu: Convert remaining simple drivers to domain_alloc_paging()

From: Baolu Lu <baolu.lu@linux.intel.com>
Date: 2023-08-14 07:01:45
Also in: linux-arm-kernel, linux-arm-msm, linux-iommu, linux-mediatek, linux-rockchip, linux-s390, linux-samsung-soc, linux-sunxi, linux-tegra

On 2023/8/3 8:08, Jason Gunthorpe wrote:
These drivers don't support IOMMU_DOMAIN_DMA, so this commit effectively
allows them to support that mode.

The prior work to require default_domains makes this safe because every
one of these drivers is either compilation incompatible with dma-iommu.c,
or already establishing a default_domain. In both cases alloc_domain()
will never be called with IOMMU_DOMAIN_DMA for these drivers so it is safe
to drop the test.

Removing these tests clarifies that the domain allocation path is only
about the functionality of a paging domain and has nothing to do with
policy of how the paging domain is used for UNMANAGED/DMA/DMA_FQ.

Tested-by: Niklas Schnelle<schnelle@linux.ibm.com>
Tested-by: Steven Price<steven.price@arm.com>
Tested-by: Marek Szyprowski<m.szyprowski@samsung.com>
Tested-by: Nicolin Chen<redacted>
Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>
---
  drivers/iommu/msm_iommu.c    | 7 ++-----
  drivers/iommu/mtk_iommu_v1.c | 7 ++-----
  drivers/iommu/omap-iommu.c   | 7 ++-----
  drivers/iommu/s390-iommu.c   | 7 ++-----
  4 files changed, 8 insertions(+), 20 deletions(-)
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help