public inbox for linux-kselftest@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>, Shuah Khan <shuah@kernel.org>,
	Nicolin Chen <nicolinc@nvidia.com>,
	"Liu, Yi L" <yi.l.liu@intel.com>
Subject: Re: [PATCH v2 5/7] iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain()
Date: Fri, 24 Feb 2023 13:02:58 -0400	[thread overview]
Message-ID: <Y/jtwj7CcTOvV+WW@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB527686A5ECB8DB6B34E07BAC8CA89@BN9PR11MB5276.namprd11.prod.outlook.com>

On Fri, Feb 24, 2023 at 06:35:22AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > Sent: Thursday, February 23, 2023 5:03 AM
> > 
> > +static int iommufd_device_do_attach(struct iommufd_device *idev,
> > +				    struct iommufd_hw_pagetable *hwpt)
> > +{
> > +	int rc;
> > +
> > +	mutex_lock(&hwpt->devices_lock);
> > +	rc = iommufd_hw_pagetable_attach(hwpt, idev);
> > +	if (rc)
> > +		goto out_unlock;
> > 
> >  	idev->hwpt = hwpt;
> >  	refcount_inc(&hwpt->obj.users);
> > +	/* hwpt->devices is all domains that have been attached */
> >  	list_add(&idev->devices_item, &hwpt->devices);
> 
> s/domains/devices/
> 
> but I didn't see what additional info this comment actually
> give in this place. It's there in a function name xxx_attach then
> certainly every device in that list has been attached.
> 
> > +
> > +	rc = iopt_table_add_domain(&hwpt->ioas->iopt, hwpt->domain);
> > +	if (rc)
> > +		goto out_detach;
> > +
> > +	/* ioas->hwpt_list is hwpts after iopt_table_add_domain() */
> > +	list_add_tail(&hwpt->hwpt_item, &hwpt->ioas->hwpt_list);
> 
> again the comment is meaningless

Okay I just deleted them

Thanks,
Jason

  reply	other threads:[~2023-02-24 17:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 21:02 [PATCH v2 0/7] Revise the hwpt lifetime model Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 1/7] iommufd: Assert devices_lock for iommufd_hw_pagetable_has_group() Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 2/7] iommufd: Add iommufd_lock_obj() around the auto-domains hwpts Jason Gunthorpe
2023-02-24  6:12   ` Tian, Kevin
2023-02-22 21:02 ` [PATCH v2 3/7] iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy() Jason Gunthorpe
2023-02-24  6:25   ` Tian, Kevin
2023-02-22 21:02 ` [PATCH v2 4/7] iommufd: Move iommufd_device to iommufd_private.h Jason Gunthorpe
2023-02-24  6:27   ` Tian, Kevin
2023-02-22 21:02 ` [PATCH v2 5/7] iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain() Jason Gunthorpe
2023-02-23  9:03   ` Tian, Kevin
2023-02-23 13:07     ` Jason Gunthorpe
2023-02-24  6:35   ` Tian, Kevin
2023-02-24 17:02     ` Jason Gunthorpe [this message]
2023-02-22 21:02 ` [PATCH v2 6/7] iommufd/selftest: Make selftest create a more complete mock device Jason Gunthorpe
2023-02-24  6:50   ` Tian, Kevin
2023-02-24 14:26     ` Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 7/7] iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument Jason Gunthorpe
2023-02-24  7:02   ` Tian, Kevin
2023-02-24 18:19     ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y/jtwj7CcTOvV+WW@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=kevin.tian@intel.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=yi.l.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox