Re: [PATCH v11 7/9] iommu/arm-smmu-v3: Add struct arm_smmu_impl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux