[PATCH 01/10] iommu: Remove useless group refcounting
Jason Gunthorpe
jgg at nvidia.com
Fri Jul 21 05:01:45 PDT 2023
On Fri, Jul 21, 2023 at 07:10:57AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg at nvidia.com>
> > Sent: Wednesday, July 19, 2023 3:06 AM
> >
> > int iommu_device_use_default_domain(struct device *dev)
> > {
> > - struct iommu_group *group = iommu_group_get(dev);
> > + /* Caller must be a probed driver on dev */
> > + struct iommu_group *group = dev->iommu_group;
> > int ret = 0;
>
> this is called in the probing path by .dma_configure().
>
> the driver hasn't been probed yet hence the rationale to not
> refcount is due to device_lock() instead?
At this point the driver core has partially attached/detached a driver
so I'm considering it part of the probed driver explanation.
Really during anything protected by the driver core probe path is
assured that the group cannot change.
Jason
More information about the linux-arm-kernel
mailing list