linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation
@ 2021-10-12 15:18 Arnd Bergmann
  2021-10-13  7:58 ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2021-10-12 15:18 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: Arnd Bergmann, Daniel Lezcano, Dmitry Baryshkov, John Stultz,
	Jean-Philippe Brucker, Zhen Lei, Robin Murphy, Yong Wu,
	Kalle Valo, Alex Elder, iommu, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

My previous bugfix ended up making things worse for the QCOM IOMMU
driver when it forgot to add the Kconfig symbol that is getting used to
control the compilation of the SMMU implementation specific code
for Qualcomm.

Fixes: 424953cf3c66 ("qcom_scm: hide Kconfig symbol")
Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reported-by: John Stultz <john.stultz@linaro.org>
Link: https://lore.kernel.org/lkml/20211010023350.978638-1-dmitry.baryshkov@linaro.org/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
In case we want fix it this way after all, here is the patch
I made. Either this one or Dmitry patch from the link above
is required for v5.15
---
 drivers/iommu/Kconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index c5c71b7ab7e8..3eb68fa1b8cc 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -355,6 +355,14 @@ config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
 	  'arm-smmu.disable_bypass' will continue to override this
 	  config.
 
+config ARM_SMMU_QCOM
+	def_tristate y
+	depends on ARM_SMMU && ARCH_QCOM
+	select QCOM_SCM
+	help
+	  When running on a Qualcomm platform that has the custom variant
+	  of the ARM SMMU, this needs to be built into the SMMU driver.
+
 config ARM_SMMU_V3
 	tristate "ARM Ltd. System MMU Version 3 (SMMUv3) Support"
 	depends on ARM64
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation
  2021-10-12 15:18 [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation Arnd Bergmann
@ 2021-10-13  7:58 ` Will Deacon
  2021-10-13  8:33   ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2021-10-13  7:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Joerg Roedel, Arnd Bergmann, Daniel Lezcano, Dmitry Baryshkov,
	John Stultz, Jean-Philippe Brucker, Zhen Lei, Robin Murphy,
	Yong Wu, Kalle Valo, Alex Elder, iommu, linux-kernel

On Tue, Oct 12, 2021 at 05:18:00PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> My previous bugfix ended up making things worse for the QCOM IOMMU
> driver when it forgot to add the Kconfig symbol that is getting used to
> control the compilation of the SMMU implementation specific code
> for Qualcomm.
> 
> Fixes: 424953cf3c66 ("qcom_scm: hide Kconfig symbol")
> Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Reported-by: John Stultz <john.stultz@linaro.org>
> Link: https://lore.kernel.org/lkml/20211010023350.978638-1-dmitry.baryshkov@linaro.org/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> In case we want fix it this way after all, here is the patch
> I made. Either this one or Dmitry patch from the link above
> is required for v5.15
> ---
>  drivers/iommu/Kconfig | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index c5c71b7ab7e8..3eb68fa1b8cc 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -355,6 +355,14 @@ config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
>  	  'arm-smmu.disable_bypass' will continue to override this
>  	  config.
>  
> +config ARM_SMMU_QCOM
> +	def_tristate y
> +	depends on ARM_SMMU && ARCH_QCOM
> +	select QCOM_SCM
> +	help
> +	  When running on a Qualcomm platform that has the custom variant
> +	  of the ARM SMMU, this needs to be built into the SMMU driver.
> +

FWIW, I prefer this solution over changing the driver code, so:

Acked-by: Will Deacon <will@kernel.org>

I assume you'll be getting this fixed for 5.15?

Cheers,

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation
  2021-10-13  7:58 ` Will Deacon
@ 2021-10-13  8:33   ` Arnd Bergmann
  2021-10-13 16:20     ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2021-10-13  8:33 UTC (permalink / raw)
  To: Will Deacon
  Cc: Joerg Roedel, Arnd Bergmann, Daniel Lezcano, Dmitry Baryshkov,
	John Stultz, Jean-Philippe Brucker, Zhen Lei, Robin Murphy,
	Yong Wu, Kalle Valo, Alex Elder, open list:IOMMU DRIVERS,
	Linux Kernel Mailing List

On Wed, Oct 13, 2021 at 9:58 AM Will Deacon <will@kernel.org> wrote:
> On Tue, Oct 12, 2021 at 05:18:00PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > My previous bugfix ended up making things worse for the QCOM IOMMU
> > driver when it forgot to add the Kconfig symbol that is getting used to
> > control the compilation of the SMMU implementation specific code
> > for Qualcomm.
> >
> > Fixes: 424953cf3c66 ("qcom_scm: hide Kconfig symbol")
> > Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Reported-by: John Stultz <john.stultz@linaro.org>
> > Link: https://lore.kernel.org/lkml/20211010023350.978638-1-dmitry.baryshkov@linaro.org/
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > In case we want fix it this way after all, here is the patch
> > I made. Either this one or Dmitry patch from the link above
> > is required for v5.15
> > ---
> >  drivers/iommu/Kconfig | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> > index c5c71b7ab7e8..3eb68fa1b8cc 100644
> > --- a/drivers/iommu/Kconfig
> > +++ b/drivers/iommu/Kconfig
> > @@ -355,6 +355,14 @@ config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
> >         'arm-smmu.disable_bypass' will continue to override this
> >         config.
> >
> > +config ARM_SMMU_QCOM
> > +     def_tristate y
> > +     depends on ARM_SMMU && ARCH_QCOM
> > +     select QCOM_SCM
> > +     help
> > +       When running on a Qualcomm platform that has the custom variant
> > +       of the ARM SMMU, this needs to be built into the SMMU driver.
> > +
>
> FWIW, I prefer this solution over changing the driver code, so:
>
> Acked-by: Will Deacon <will@kernel.org>
>
> I assume you'll be getting this fixed for 5.15?

I was hoping you and Joerg could just pick your preferred patch
into the iommu fixes tree for v5.15.

I currently have nothing else pending for my asm-generic tree that
introduced the regression, but I can take it through there if that helps
you.

         Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation
  2021-10-13  8:33   ` Arnd Bergmann
@ 2021-10-13 16:20     ` Will Deacon
  2021-10-13 19:31       ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2021-10-13 16:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Joerg Roedel, Arnd Bergmann, Daniel Lezcano, Dmitry Baryshkov,
	John Stultz, Jean-Philippe Brucker, Zhen Lei, Robin Murphy,
	Yong Wu, Kalle Valo, Alex Elder, open list:IOMMU DRIVERS,
	Linux Kernel Mailing List

Hi Arnd,

On Wed, Oct 13, 2021 at 10:33:55AM +0200, Arnd Bergmann wrote:
> On Wed, Oct 13, 2021 at 9:58 AM Will Deacon <will@kernel.org> wrote:
> > On Tue, Oct 12, 2021 at 05:18:00PM +0200, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@arndb.de>
> > >
> > > My previous bugfix ended up making things worse for the QCOM IOMMU
> > > driver when it forgot to add the Kconfig symbol that is getting used to
> > > control the compilation of the SMMU implementation specific code
> > > for Qualcomm.
> > >
> > > Fixes: 424953cf3c66 ("qcom_scm: hide Kconfig symbol")
> > > Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > > Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > > Reported-by: John Stultz <john.stultz@linaro.org>
> > > Link: https://lore.kernel.org/lkml/20211010023350.978638-1-dmitry.baryshkov@linaro.org/
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > ---
> > > In case we want fix it this way after all, here is the patch
> > > I made. Either this one or Dmitry patch from the link above
> > > is required for v5.15
> > > ---
> > >  drivers/iommu/Kconfig | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > >
> > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> > > index c5c71b7ab7e8..3eb68fa1b8cc 100644
> > > --- a/drivers/iommu/Kconfig
> > > +++ b/drivers/iommu/Kconfig
> > > @@ -355,6 +355,14 @@ config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
> > >         'arm-smmu.disable_bypass' will continue to override this
> > >         config.
> > >
> > > +config ARM_SMMU_QCOM
> > > +     def_tristate y
> > > +     depends on ARM_SMMU && ARCH_QCOM
> > > +     select QCOM_SCM
> > > +     help
> > > +       When running on a Qualcomm platform that has the custom variant
> > > +       of the ARM SMMU, this needs to be built into the SMMU driver.
> > > +
> >
> > FWIW, I prefer this solution over changing the driver code, so:
> >
> > Acked-by: Will Deacon <will@kernel.org>
> >
> > I assume you'll be getting this fixed for 5.15?
> 
> I was hoping you and Joerg could just pick your preferred patch
> into the iommu fixes tree for v5.15.
> 
> I currently have nothing else pending for my asm-generic tree that
> introduced the regression, but I can take it through there if that helps
> you.

I also don't have any fixes pending, and I don't see any in Joerg's tree so
it's probably quickest if you send it on yourself. Is that ok?

Cheers,

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation
  2021-10-13 16:20     ` Will Deacon
@ 2021-10-13 19:31       ` Arnd Bergmann
  2021-10-14  7:35         ` Will Deacon
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2021-10-13 19:31 UTC (permalink / raw)
  To: Will Deacon
  Cc: Joerg Roedel, Arnd Bergmann, Daniel Lezcano, Dmitry Baryshkov,
	John Stultz, Jean-Philippe Brucker, Zhen Lei, Robin Murphy,
	Yong Wu, Kalle Valo, Alex Elder, open list:IOMMU DRIVERS,
	Linux Kernel Mailing List

On Wed, Oct 13, 2021 at 6:20 PM Will Deacon <will@kernel.org> wrote:
> On Wed, Oct 13, 2021 at 10:33:55AM +0200, Arnd Bergmann wrote:
> > On Wed, Oct 13, 2021 at 9:58 AM Will Deacon <will@kernel.org> wrote:
> > > On Tue, Oct 12, 2021 at 05:18:00PM +0200, Arnd Bergmann wrote:

> > I was hoping you and Joerg could just pick your preferred patch
> > into the iommu fixes tree for v5.15.
> >
> > I currently have nothing else pending for my asm-generic tree that
> > introduced the regression, but I can take it through there if that helps
> > you.
>
> I also don't have any fixes pending, and I don't see any in Joerg's tree so
> it's probably quickest if you send it on yourself. Is that ok?

Sure, no problem. I ended up adding it to the arm/fixes branch of the
soc tree, as I just merged some other fixes there, and it seems as good
as any of the other trees.

      Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation
  2021-10-13 19:31       ` Arnd Bergmann
@ 2021-10-14  7:35         ` Will Deacon
  0 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2021-10-14  7:35 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Joerg Roedel, Arnd Bergmann, Daniel Lezcano, Dmitry Baryshkov,
	John Stultz, Jean-Philippe Brucker, Zhen Lei, Robin Murphy,
	Yong Wu, Kalle Valo, Alex Elder, open list:IOMMU DRIVERS,
	Linux Kernel Mailing List

On Wed, Oct 13, 2021 at 09:31:40PM +0200, Arnd Bergmann wrote:
> On Wed, Oct 13, 2021 at 6:20 PM Will Deacon <will@kernel.org> wrote:
> > On Wed, Oct 13, 2021 at 10:33:55AM +0200, Arnd Bergmann wrote:
> > > On Wed, Oct 13, 2021 at 9:58 AM Will Deacon <will@kernel.org> wrote:
> > > > On Tue, Oct 12, 2021 at 05:18:00PM +0200, Arnd Bergmann wrote:
> 
> > > I was hoping you and Joerg could just pick your preferred patch
> > > into the iommu fixes tree for v5.15.
> > >
> > > I currently have nothing else pending for my asm-generic tree that
> > > introduced the regression, but I can take it through there if that helps
> > > you.
> >
> > I also don't have any fixes pending, and I don't see any in Joerg's tree so
> > it's probably quickest if you send it on yourself. Is that ok?
> 
> Sure, no problem. I ended up adding it to the arm/fixes branch of the
> soc tree, as I just merged some other fixes there, and it seems as good
> as any of the other trees.

Thanks, Arnd!

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-14  7:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 15:18 [PATCH] iommu/arm: fix ARM_SMMU_QCOM compilation Arnd Bergmann
2021-10-13  7:58 ` Will Deacon
2021-10-13  8:33   ` Arnd Bergmann
2021-10-13 16:20     ` Will Deacon
2021-10-13 19:31       ` Arnd Bergmann
2021-10-14  7:35         ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).