[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABQgh9E2N35pJ5Ehmhq0JydKjWqswypOH9qepu+9QmHmVzdvBw@mail.gmail.com>
Date: Mon, 24 Feb 2025 18:00:03 +0800
From: Zhangfei Gao <zhangfei.gao@...aro.org>
To: Lu Baolu <baolu.lu@...ux.intel.com>
Cc: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>, Jason Gunthorpe <jgg@...pe.ca>, Kevin Tian <kevin.tian@...el.com>,
Dave Jiang <dave.jiang@...el.com>, Vinod Koul <vkoul@...nel.org>,
Fenghua Yu <fenghuay@...dia.com>, Zhou Wang <wangzhou1@...ilicon.com>, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, Jason Gunthorpe <jgg@...dia.com>
Subject: Re: [PATCH v2 10/12] uacce: Remove unnecessary IOMMU_DEV_FEAT_IOPF
On Mon, 24 Feb 2025 at 13:16, Lu Baolu <baolu.lu@...ux.intel.com> wrote:
>
> None of the drivers implement anything for IOMMU_DEV_FEAT_IOPF anymore,
> remove it to avoid dead code.
>
> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
Acked-by: Zhangfei Gao <zhangfei.gao@...aro.org>
> ---
> drivers/misc/uacce/uacce.c | 31 -------------------------------
> 1 file changed, 31 deletions(-)
>
> diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
> index 2a1db2abeeca..42e7d2a2a90c 100644
> --- a/drivers/misc/uacce/uacce.c
> +++ b/drivers/misc/uacce/uacce.c
> @@ -465,31 +465,6 @@ static void uacce_release(struct device *dev)
> kfree(uacce);
> }
>
> -static unsigned int uacce_enable_sva(struct device *parent, unsigned int flags)
> -{
> - int ret;
> -
> - if (!(flags & UACCE_DEV_SVA))
> - return flags;
> -
> - flags &= ~UACCE_DEV_SVA;
> -
> - ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_IOPF);
> - if (ret) {
> - dev_err(parent, "failed to enable IOPF feature! ret = %pe\n", ERR_PTR(ret));
> - return flags;
> - }
> - return flags | UACCE_DEV_SVA;
> -}
> -
> -static void uacce_disable_sva(struct uacce_device *uacce)
> -{
> - if (!(uacce->flags & UACCE_DEV_SVA))
> - return;
> -
> - iommu_dev_disable_feature(uacce->parent, IOMMU_DEV_FEAT_IOPF);
> -}
> -
> /**
> * uacce_alloc() - alloc an accelerator
> * @parent: pointer of uacce parent device
> @@ -509,8 +484,6 @@ struct uacce_device *uacce_alloc(struct device *parent,
> if (!uacce)
> return ERR_PTR(-ENOMEM);
>
> - flags = uacce_enable_sva(parent, flags);
> -
> uacce->parent = parent;
> uacce->flags = flags;
> uacce->ops = interface->ops;
> @@ -533,7 +506,6 @@ struct uacce_device *uacce_alloc(struct device *parent,
> return uacce;
>
> err_with_uacce:
> - uacce_disable_sva(uacce);
> kfree(uacce);
> return ERR_PTR(ret);
> }
> @@ -596,9 +568,6 @@ void uacce_remove(struct uacce_device *uacce)
> unmap_mapping_range(q->mapping, 0, 0, 1);
> }
>
> - /* disable sva now since no opened queues */
> - uacce_disable_sva(uacce);
> -
> if (uacce->cdev)
> cdev_device_del(uacce->cdev, &uacce->dev);
> xa_erase(&uacce_xa, uacce->dev_id);
> --
> 2.43.0
>
Powered by blists - more mailing lists