linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: qcom: drop 32-bit machine Kconfig entries.
@ 2023-12-07 12:54 Dmitry Baryshkov
  2023-12-07 12:54 ` [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much Dmitry Baryshkov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-12-07 12:54 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Clark
  Cc: Vinod Koul, Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm,
	iommu, devicetree, freedreno

The Kconfig for 32-bit Qualcomm arch predates DT and multi-machine
support. It still defines ARCH_MSM* types for some (but not all) 32-bit
Qualcomm machines. The MSM_IOMMU driver has a strict dependency on one
of such kinds.

With the DT support in place, this has become obsolete quite a while
ago. Replace all 32-bit Qualcomm ARCH kinds with the single Kconfig
entry for the workaround required to be enabled for some of those 32-bit
platforms.

Dmitry Baryshkov (3):
  iommu/msm-iommu: don't limit the driver too much
  ARM: qcom: drop most of 32-bit ARCH_QCOM subtypes
  ARM: qcom: merge remaining subplatforms into sensible Kconfig entry

 arch/arm/Makefile          |  4 +---
 arch/arm/mach-qcom/Kconfig | 41 ++++++++------------------------------
 drivers/iommu/Kconfig      |  2 +-
 3 files changed, 10 insertions(+), 37 deletions(-)

-- 
2.39.2


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

* [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much
  2023-12-07 12:54 [PATCH 0/3] ARM: qcom: drop 32-bit machine Kconfig entries Dmitry Baryshkov
@ 2023-12-07 12:54 ` Dmitry Baryshkov
  2023-12-07 13:06   ` Robin Murphy
  2023-12-07 12:54 ` [PATCH 2/3] ARM: qcom: drop most of 32-bit ARCH_QCOM subtypes Dmitry Baryshkov
  2023-12-07 12:55 ` [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry Dmitry Baryshkov
  2 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-12-07 12:54 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Clark
  Cc: Vinod Koul, Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm,
	iommu, devicetree, freedreno

In preparation of dropping most of ARCH_QCOM subtypes, stop limiting the
driver just to those machines. Allow it to be built for any 32-bit
Qualcomm platform (ARCH_QCOM).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/iommu/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 7673bb82945b..fd67f586f010 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -178,7 +178,7 @@ config FSL_PAMU
 config MSM_IOMMU
 	bool "MSM IOMMU Support"
 	depends on ARM
-	depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
+	depends on ARCH_QCOM || COMPILE_TEST
 	select IOMMU_API
 	select IOMMU_IO_PGTABLE_ARMV7S
 	help
-- 
2.39.2


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

* [PATCH 2/3] ARM: qcom: drop most of 32-bit ARCH_QCOM subtypes
  2023-12-07 12:54 [PATCH 0/3] ARM: qcom: drop 32-bit machine Kconfig entries Dmitry Baryshkov
  2023-12-07 12:54 ` [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much Dmitry Baryshkov
@ 2023-12-07 12:54 ` Dmitry Baryshkov
  2023-12-07 12:55 ` [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry Dmitry Baryshkov
  2 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-12-07 12:54 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Clark
  Cc: Vinod Koul, Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm,
	iommu, devicetree, freedreno

Historically we had several subtypes of 32-bit Qualcomm platforms.
Nowadays they became just useless symbols in Kconfig. Drop them and pull
corresponding clocksource entries towards top-level ARCH_QCOM entry.

Note, I've left ARCH_IPQ40XX, ARCH_MSM8x60 and ARCH_MSM8960 in place,
since they have special TEXT_OFFSET handling, which can be sorted out
separately.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/mach-qcom/Kconfig | 30 ++++--------------------------
 1 file changed, 4 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index 12a812e61c16..27d5ca0043be 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -4,46 +4,24 @@ menuconfig ARCH_QCOM
 	depends on ARCH_MULTI_V7
 	select ARM_GIC
 	select ARM_AMBA
+	select CLKSRC_QCOM
+	select HAVE_ARM_ARCH_TIMER
 	select PINCTRL
 	select QCOM_SCM if SMP
 	help
 	  Support for Qualcomm's devicetree based systems.
+	  This includes support for a few devices with ARM64 SoC, that have
+	  ARM32 signed firmware that does not allow booting ARM64 kernels.
 
 if ARCH_QCOM
 
 config ARCH_IPQ40XX
 	bool "Enable support for IPQ40XX"
-	select CLKSRC_QCOM
-	select HAVE_ARM_ARCH_TIMER
 
 config ARCH_MSM8X60
 	bool "Enable support for MSM8X60"
-	select CLKSRC_QCOM
-
-config ARCH_MSM8909
-	bool "Enable support for MSM8909"
-	select HAVE_ARM_ARCH_TIMER
-
-config ARCH_MSM8916
-	bool "Enable support for MSM8916"
-	select HAVE_ARM_ARCH_TIMER
-	help
-	  Enable support for the Qualcomm Snapdragon 410 (MSM8916/APQ8016).
-
-	  Note that ARM64 is the main supported architecture for MSM8916.
-	  The ARM32 option is intended for a few devices with signed firmware
-	  that does not allow booting ARM64 kernels.
 
 config ARCH_MSM8960
 	bool "Enable support for MSM8960"
-	select CLKSRC_QCOM
-
-config ARCH_MSM8974
-	bool "Enable support for MSM8974"
-	select HAVE_ARM_ARCH_TIMER
-
-config ARCH_MDM9615
-	bool "Enable support for MDM9615"
-	select CLKSRC_QCOM
 
 endif
-- 
2.39.2


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

* [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry
  2023-12-07 12:54 [PATCH 0/3] ARM: qcom: drop 32-bit machine Kconfig entries Dmitry Baryshkov
  2023-12-07 12:54 ` [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much Dmitry Baryshkov
  2023-12-07 12:54 ` [PATCH 2/3] ARM: qcom: drop most of 32-bit ARCH_QCOM subtypes Dmitry Baryshkov
@ 2023-12-07 12:55 ` Dmitry Baryshkov
  2023-12-16  5:26   ` Bjorn Andersson
  2 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-12-07 12:55 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Clark
  Cc: Vinod Koul, Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm,
	iommu, devicetree, freedreno

Three remaining Qualcomm platforms have special handling of the
TEXT_OFFSET to reserve the memory at the beginnig of the system RAM, see
the commit 9e775ad19f52 ("ARM: 7012/1: Set proper TEXT_OFFSET for newer
MSMs"). This is required for older platforms like IPQ40xx, MSM8x60,
MSM8960 and APQ8064 and is compatible with other 32-bit Qualcomm
platforms.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm/Makefile          |  4 +---
 arch/arm/mach-qcom/Kconfig | 13 +++++--------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 5ba42f69f8ce..45fa8ac001c5 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -158,9 +158,7 @@ textofs-$(CONFIG_ARCH_REALTEK)  := 0x00108000
 ifeq ($(CONFIG_ARCH_SA1100),y)
 textofs-$(CONFIG_SA1111) := 0x00208000
 endif
-textofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000
-textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
-textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
+textofs-$(CONFIG_ARCH_QCOM_SMEM) := 0x00208000
 textofs-$(CONFIG_ARCH_MESON) := 0x00208000
 textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
 
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index 27d5ca0043be..0c99d0a746d4 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -15,13 +15,10 @@ menuconfig ARCH_QCOM
 
 if ARCH_QCOM
 
-config ARCH_IPQ40XX
-	bool "Enable support for IPQ40XX"
-
-config ARCH_MSM8X60
-	bool "Enable support for MSM8X60"
-
-config ARCH_MSM8960
-	bool "Enable support for MSM8960"
+config ARCH_QCOM_SMEM
+	bool "Reserve SMEM at the beginning of RAM"
+	help
+	  Reserve 2MB at the beginning of the System RAM for shared mem.
+	  This is required on IPQ40xx, MSM8x60 and MSM8960 platforms.
 
 endif
-- 
2.39.2


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

* Re: [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much
  2023-12-07 12:54 ` [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much Dmitry Baryshkov
@ 2023-12-07 13:06   ` Robin Murphy
  2023-12-11 13:20     ` Joerg Roedel
  0 siblings, 1 reply; 7+ messages in thread
From: Robin Murphy @ 2023-12-07 13:06 UTC (permalink / raw)
  To: Dmitry Baryshkov, Will Deacon, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Clark
  Cc: Vinod Koul, Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm,
	iommu, devicetree, freedreno

On 07/12/2023 12:54 pm, Dmitry Baryshkov wrote:
> In preparation of dropping most of ARCH_QCOM subtypes, stop limiting the
> driver just to those machines. Allow it to be built for any 32-bit
> Qualcomm platform (ARCH_QCOM).

Acked-by: Robin Murphy <robin.murphy@arm.com>

Unless Joerg disagrees, I think it should be fine if you want to take 
this via the SoC tree.

Thanks,
Robin.


> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/iommu/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 7673bb82945b..fd67f586f010 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -178,7 +178,7 @@ config FSL_PAMU
>   config MSM_IOMMU
>   	bool "MSM IOMMU Support"
>   	depends on ARM
> -	depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
> +	depends on ARCH_QCOM || COMPILE_TEST
>   	select IOMMU_API
>   	select IOMMU_IO_PGTABLE_ARMV7S
>   	help

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

* Re: [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much
  2023-12-07 13:06   ` Robin Murphy
@ 2023-12-11 13:20     ` Joerg Roedel
  0 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2023-12-11 13:20 UTC (permalink / raw)
  To: Robin Murphy
  Cc: Dmitry Baryshkov, Will Deacon, Rob Herring, Krzysztof Kozlowski,
	Bjorn Andersson, Konrad Dybcio, Rob Clark, Vinod Koul,
	Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm, iommu,
	devicetree, freedreno

On Thu, Dec 07, 2023 at 01:06:09PM +0000, Robin Murphy wrote:
> On 07/12/2023 12:54 pm, Dmitry Baryshkov wrote:
> > In preparation of dropping most of ARCH_QCOM subtypes, stop limiting the
> > driver just to those machines. Allow it to be built for any 32-bit
> > Qualcomm platform (ARCH_QCOM).
> 
> Acked-by: Robin Murphy <robin.murphy@arm.com>
> 
> Unless Joerg disagrees, I think it should be fine if you want to take this
> via the SoC tree.

No objections:

Acked-by: Joerg Roedel <jroedel@suse.de>


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

* Re: [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry
  2023-12-07 12:55 ` [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry Dmitry Baryshkov
@ 2023-12-16  5:26   ` Bjorn Andersson
  0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-12-16  5:26 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Will Deacon, Robin Murphy, Joerg Roedel, Rob Herring,
	Krzysztof Kozlowski, Konrad Dybcio, Rob Clark, Vinod Koul,
	Sai Prakash Ranjan, linux-arm-kernel, linux-arm-msm, iommu,
	devicetree, freedreno

On Thu, Dec 07, 2023 at 03:55:00PM +0300, Dmitry Baryshkov wrote:
> Three remaining Qualcomm platforms have special handling of the
> TEXT_OFFSET to reserve the memory at the beginnig of the system RAM, see
> the commit 9e775ad19f52 ("ARM: 7012/1: Set proper TEXT_OFFSET for newer
> MSMs"). This is required for older platforms like IPQ40xx, MSM8x60,
> MSM8960 and APQ8064 and is compatible with other 32-bit Qualcomm
> platforms.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  arch/arm/Makefile          |  4 +---
>  arch/arm/mach-qcom/Kconfig | 13 +++++--------
>  2 files changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 5ba42f69f8ce..45fa8ac001c5 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -158,9 +158,7 @@ textofs-$(CONFIG_ARCH_REALTEK)  := 0x00108000
>  ifeq ($(CONFIG_ARCH_SA1100),y)
>  textofs-$(CONFIG_SA1111) := 0x00208000
>  endif
> -textofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000
> -textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
> -textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
> +textofs-$(CONFIG_ARCH_QCOM_SMEM) := 0x00208000
>  textofs-$(CONFIG_ARCH_MESON) := 0x00208000
>  textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
>  
> diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
> index 27d5ca0043be..0c99d0a746d4 100644
> --- a/arch/arm/mach-qcom/Kconfig
> +++ b/arch/arm/mach-qcom/Kconfig
> @@ -15,13 +15,10 @@ menuconfig ARCH_QCOM
>  
>  if ARCH_QCOM
>  
> -config ARCH_IPQ40XX
> -	bool "Enable support for IPQ40XX"
> -
> -config ARCH_MSM8X60
> -	bool "Enable support for MSM8X60"
> -
> -config ARCH_MSM8960
> -	bool "Enable support for MSM8960"
> +config ARCH_QCOM_SMEM

How about expanding this to ARCH_QCOM_RESERVE_SMEM or similar, to make
it more descriptive and less similar to the existing QCOM_SMEM option?

Regards,
Bjorn


> +	bool "Reserve SMEM at the beginning of RAM"
> +	help
> +	  Reserve 2MB at the beginning of the System RAM for shared mem.
> +	  This is required on IPQ40xx, MSM8x60 and MSM8960 platforms.
>  
>  endif
> -- 
> 2.39.2
> 

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

end of thread, other threads:[~2023-12-16  5:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07 12:54 [PATCH 0/3] ARM: qcom: drop 32-bit machine Kconfig entries Dmitry Baryshkov
2023-12-07 12:54 ` [PATCH 1/3] iommu/msm-iommu: don't limit the driver too much Dmitry Baryshkov
2023-12-07 13:06   ` Robin Murphy
2023-12-11 13:20     ` Joerg Roedel
2023-12-07 12:54 ` [PATCH 2/3] ARM: qcom: drop most of 32-bit ARCH_QCOM subtypes Dmitry Baryshkov
2023-12-07 12:55 ` [PATCH 3/3] ARM: qcom: merge remaining subplatforms into sensible Kconfig entry Dmitry Baryshkov
2023-12-16  5:26   ` Bjorn Andersson

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).