Thread (46 messages) 46 messages, 14 authors, 2026-04-01

Re: [PATCH v2 3/4] iommu: Keep dev->iommu state consistent

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2025-03-05 18:14:37
Also in: linux-acpi, linux-arm-kernel, linux-iommu, linux-pci, lkml

On Fri, Feb 28, 2025 at 03:46:32PM +0000, Robin Murphy wrote:
quoted hunk ↗ jump to hunk
@@ -127,6 +128,7 @@ int of_iommu_configure(struct device *dev, struct device_node *master_np,
 		mutex_unlock(&iommu_probe_device_lock);
 		return 0;
 	}
+	dev_iommu_present = dev->iommu;
I feel like this deserves a comment..

Maybe it is:

/*
 * If of_iommu_configure is called outside the iommu probe path
 * dev->iommu should be NULL and it needs to remain as NULL
 * If it is called within the probe path then the dev->iommu
 * was setup by iommu_init_device() and must not be changed.
 */

And I think the commit message should explain what consistent
means.. AFAICT you are going for !dev->iommu means no probe has
succeed / dev->iommu means a probe is ongoing in this call chain or
it has succeeded?

Otherwise:

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

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