Thread (34 messages) 34 messages, 7 authors, 2023-08-09

RE: [PATCH v2 02/10] iommu: Add a lockdep assertion for remaining dev->iommu_group reads

From: "Tian, Kevin" <kevin.tian@intel.com>
Date: 2023-08-02 01:35:15
Also in: linux-iommu, linux-rockchip, linux-sunxi

From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Tuesday, August 1, 2023 1:50 AM

The remaining reads are all in functions called under ops->device_group.

Broadly these functions are walking around the device tree (eg going up
the PCI bus tree) and are trying to de-duplicate group allocations
according to their logic.

Since these functions don't hold any particular per-device locks their
reads to dev->iommu_group are being locked by the caller's
iommu_probe_device_lock, and this explains why
iommu_probe_device_lock
needs to be a global lock.

Rename iommu_probe_device_lock to dev_iommu_group_lock, make it local
to
the module and annotate all the device_group helpers with
iommu_group_get_locked() that includes a lockdep to indicate that they are
special.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help