From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Murphy Subject: Re: [PATCH v10 2/5] iommu/arm-smmu: ioremap smmu mmio region before implementation init Date: Mon, 13 Jul 2020 15:02:28 +0100 Message-ID: <49c222ce-e889-937a-6f05-eb1b46739306@arm.com> References: <20200708050017.31563-1-vdumpa@nvidia.com> <20200708050017.31563-3-vdumpa@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200708050017.31563-3-vdumpa-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Content-Language: en-GB Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Krishna Reddy , joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org, will-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, yhsu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, snikam-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, praithatha-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, bbiswas-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, nicolinc-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, bhuntsman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org List-Id: linux-tegra@vger.kernel.org On 2020-07-08 06:00, Krishna Reddy wrote: > ioremap smmu mmio region before calling into implementation init. > This is necessary to allow mapped address available during vendor > specific implementation init. Reviewed-by: Robin Murphy > Signed-off-by: Krishna Reddy > --- > drivers/iommu/arm-smmu.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > index d2054178df35..e03e873d3bca 100644 > --- a/drivers/iommu/arm-smmu.c > +++ b/drivers/iommu/arm-smmu.c > @@ -2120,10 +2120,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev) > if (err) > return err; > > - smmu = arm_smmu_impl_init(smmu); > - if (IS_ERR(smmu)) > - return PTR_ERR(smmu); > - > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > ioaddr = res->start; > smmu->base = devm_ioremap_resource(dev, res); > @@ -2135,6 +2131,10 @@ static int arm_smmu_device_probe(struct platform_device *pdev) > */ > smmu->numpage = resource_size(res); > > + smmu = arm_smmu_impl_init(smmu); > + if (IS_ERR(smmu)) > + return PTR_ERR(smmu); > + > num_irqs = 0; > while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, num_irqs))) { > num_irqs++; >