Thread (34 messages) 34 messages, 5 authors, 2025-02-27

Re: [PATCH v2 4/7] irqchip: Have CONFIG_IRQ_MSI_IOMMU be selected by irqchips that need it

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2025-02-21 14:48:38
Also in: linux-iommu, linux-kselftest, linux-patches, lkml

quoted hunk ↗ jump to hunk
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -154,7 +154,6 @@ config IOMMU_DMA
 	select DMA_OPS_HELPERS
 	select IOMMU_API
 	select IOMMU_IOVA
-	select IRQ_MSI_IOMMU
 	select NEED_SG_DMA_LENGTH
 	select NEED_SG_DMA_FLAGS if SWIOTLB
Because of the above this patch needs to add:
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -449,8 +449,10 @@ void iommu_put_dma_cookie(struct iommu_domain *domain)
        struct iommu_dma_cookie *cookie = domain->iova_cookie;
        struct iommu_dma_msi_page *msi, *tmp;
 
+#if IS_ENABLED(CONFIG_IRQ_MSI_IOMMU)
        if (domain->sw_msi != iommu_dma_sw_msi)
                return;
+#endif
 
        if (!cookie)
                return;
I fixed it up

I think the above if can be deleted with the sketch I showed in the
last email since the put_dma_cookie will only ever be called on the
default domain or on the vfio domain which guarantees it is not
iommufd or something else using the union.

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