[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zr2Re6vgO3SnnEUB@Asurada-Nvidia>
Date: Wed, 14 Aug 2024 22:26:19 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <will@...nel.org>, <robin.murphy@....com>, <joro@...tes.org>,
<thierry.reding@...il.com>, <vdumpa@...dia.com>, <jonathanh@...dia.com>,
<linux-kernel@...r.kernel.org>, <iommu@...ts.linux.dev>,
<linux-arm-kernel@...ts.infradead.org>, <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v11 7/9] iommu/arm-smmu-v3: Add struct arm_smmu_impl
Hi Jason,
I've addressed all the comments here. Two additional replies below.
On Wed, Aug 14, 2024 at 06:52:46PM -0300, Jason Gunthorpe wrote:
> /*
> * Probe all the compiled in implementations. Each one checks to see if it
> * matches this HW and if so returns a devm_krealloc'd arm_smmu_device which
> * replaces the callers. Otherwise the original is returned or ERR_PTR.
> *
> */
> static struct arm_smmu_device *arm_smmu_probe_impl(struct arm_smmu_device *orig_smmu)
> {
> struct arm_smmu_device *new_smmu;
> int ret;
>
> new_smmu = tegra241_cmdqv_acpi_dsdt_probe(orig_smmu);
> if (new_smmu != ERR_PTR(-ENODEV))
> goto out_new_impl;
> return orig_smmu;
>
> out_new_impl:
> if (IS_ERR(new_smmu))
> return new_smmu;
>
> /* FIXME: check is this ordering OK during remove? */
I am not able to test-verify this. At least CMDQV seems to be OK
to remove after SMMU.
> > @@ -4560,6 +4602,7 @@ static void arm_smmu_device_remove(struct platform_device *pdev)
> > {
> > struct arm_smmu_device *smmu = platform_get_drvdata(pdev);
> >
> > + arm_smmu_impl_remove(smmu);
>
> Can't call this if devm has been used to set it up, and this would be
> in the wrong order anyhow. Just remove it.. I guess the devm was put
> for this to avoid adding goto error unwind to probe?
I got that from Will's patch, and I think so, as it does simplify
the unwind routine.
Thanks!
Nicolin
Powered by blists - more mailing lists