[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250305175315.GD133783@nvidia.com>
Date: Wed, 5 Mar 2025 13:53:15 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, robin.murphy@....com, joro@...tes.org,
will@...nel.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] iommufd: Move iommufd_sw_msi and related
functions to driver.c
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
Jason
Powered by blists - more mailing lists