[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1853992c-47a6-3724-812c-a52558c13732@linux.intel.com>
Date: Wed, 15 Apr 2020 14:10:03 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
David Woodhouse <dwmw2@...radead.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Rob Clark <robdclark@...il.com>,
Heiko Stuebner <heiko@...ech.de>,
Gerald Schaefer <gerald.schaefer@...ibm.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>
Cc: baolu.lu@...ux.intel.com, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-tegra@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
Joerg Roedel <jroedel@...e.de>
Subject: Re: [PATCH v2 13/33] iommu: Export bus_iommu_probe() and make is safe
for re-probing
On 2020/4/14 21:15, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@...e.de>
>
> Add a check to the bus_iommu_probe() call-path to make sure it ignores
> devices which have already been successfully probed. Then export the
> bus_iommu_probe() function so it can be used by IOMMU drivers.
>
> Signed-off-by: Joerg Roedel <jroedel@...e.de>
> ---
> drivers/iommu/iommu.c | 6 +++++-
> include/linux/iommu.h | 1 +
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 834a45da0ed0..a2ff95424044 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -1615,6 +1615,10 @@ static int probe_iommu_group(struct device *dev, void *data)
> if (!dev_iommu_get(dev))
> return -ENOMEM;
>
> + /* Device is probed already if in a group */
> + if (iommu_group_get(dev) != NULL)
Same as
if (iommu_group_get(dev))
?
By the way, do we need to put the group if device has already been
probed?
Best regards,
baolu
Powered by blists - more mailing lists