[PATCH 01/10] iommu: Remove useless group refcounting
Tian, Kevin
kevin.tian at intel.com
Mon Jul 24 19:12:50 PDT 2023
> From: Jason Gunthorpe <jgg at nvidia.com>
> Sent: Tuesday, July 25, 2023 2:06 AM
>
> On Mon, Jul 24, 2023 at 02:11:44AM +0000, Tian, Kevin wrote:
> > > From: Jason Gunthorpe <jgg at nvidia.com>
> > > Sent: Friday, July 21, 2023 8:02 PM
> > >
> > > 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.
> > >
> >
> > Probably this worths a slightly different comment then?
>
> How about
>
> /* Caller is the driver core during the post-probe path */
>
sounds good
More information about the Linux-rockchip
mailing list