From: Nicolin Chen <nicolinc@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: <kevin.tian@intel.com>, <robin.murphy@arm.com>, <joro@8bytes.org>,
<will@kernel.org>, <iommu@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] iommufd: Move iommufd_sw_msi and related functions to driver.c
Date: Wed, 5 Mar 2025 10:53:45 -0800 [thread overview]
Message-ID: <Z8idue4YKTB4Wif9@Asurada-Nvidia> (raw)
In-Reply-To: <20250305175315.GD133783@nvidia.com>
On Wed, Mar 05, 2025 at 01:53:15PM -0400, Jason Gunthorpe wrote:
> On Mon, Mar 03, 2025 at 12:52:51PM -0800, Nicolin Chen wrote:
> > @@ -458,6 +337,7 @@ iommufd_device_attach_reserved_iova(struct iommufd_device *idev,
> > if (rc)
> > return rc;
> >
> > +#ifdef CONFIG_IRQ_MSI_IOMMU
> > if (list_empty(&idev->igroup->device_list)) {
> > rc = iommufd_group_setup_msi(idev->igroup, hwpt_paging);
> > if (rc) {
> > @@ -466,6 +346,7 @@ iommufd_device_attach_reserved_iova(struct iommufd_device *idev,
> > return rc;
> > }
> > }
> > +#endif
> > return 0;
> > }
> >
> > @@ -682,9 +563,11 @@ iommufd_group_do_replace_reserved_iova(struct iommufd_group *igroup,
> > }
> > }
> >
> > +#ifdef CONFIG_IRQ_MSI_IOMMU
> > rc = iommufd_group_setup_msi(igroup, hwpt_paging);
> > if (rc)
> > goto err_unresv;
> > +#endif
> > return 0;
>
> Lets try to avoid these ifdefs, maybe a empty inline, or maybe just
> need to put a if (!IS_ENABLED(CONFIG_IRQ_MSI_IOMMU) in the right
> spots..
>
> I'd also include the size measurement that you did in the commit
> message
Ack. Will rework.
Thanks
Nicolin
next prev parent reply other threads:[~2025-03-05 18:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 20:52 [PATCH v3 0/3] iommu: Clean up cookie and sw_msi in struct iommu_domain Nicolin Chen
2025-03-03 20:52 ` [PATCH v3 1/3] iommu: Sort out domain user data Nicolin Chen
2025-03-05 15:08 ` kernel test robot
2025-03-05 15:18 ` kernel test robot
2025-03-05 15:45 ` Robin Murphy
2025-03-05 17:48 ` Nicolin Chen
2025-03-05 16:51 ` kernel test robot
2025-03-05 17:44 ` kernel test robot
2025-03-06 5:59 ` Tian, Kevin
2025-03-06 20:10 ` Nicolin Chen
2025-03-03 20:52 ` [PATCH v3 2/3] iommufd: Move iommufd_sw_msi and related functions to driver.c Nicolin Chen
2025-03-05 17:53 ` Jason Gunthorpe
2025-03-05 18:53 ` Nicolin Chen [this message]
2025-03-03 20:52 ` [PATCH v3 3/3] iommu: Drop sw_msi from iommu_domain Nicolin Chen
2025-03-04 14:50 ` Robin Murphy
2025-03-06 6:01 ` Tian, Kevin
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=Z8idue4YKTB4Wif9@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/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