[PATCH 02/10] iommu: Add a lockdep assertion for remaining dev->iommu_group reads
Baolu Lu
baolu.lu at linux.intel.com
Wed Jul 19 23:33:00 PDT 2023
On 2023/7/19 3:05, Jason Gunthorpe wrote:
> 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.
>
> Signed-off-by: Jason Gunthorpe<jgg at nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
Best regards,
baolu
More information about the linux-arm-kernel
mailing list