Skip to contentSkip to conversation

ARM: Push selects for TWD/SCU into machine entries

PATCH Superseded Stephen Boyd 6 participants 11 messages Oct 4, 2012 – Oct 8, 2012

Subsystems (7)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Push selects for TWD/SCU into machine entries

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

Cc David Brown <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Rob Herring <[email protected]>
Cc Russell King <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc Simon Horman <[email protected]>
Cc Srinidhi Kasagar <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Viresh Kumar <[email protected]>

---

Does OMAP5 need to select TWD? I suspect not if it uses the architected timers.

 arch/arm/Kconfig               | 8 ++++++--
 arch/arm/mach-exynos/Kconfig   | 2 ++
 arch/arm/mach-highbank/Kconfig | 1 +
 arch/arm/mach-imx/Kconfig      | 2 ++
 arch/arm/mach-msm/Kconfig      | 7 ++-----
 arch/arm/mach-omap2/Kconfig    | 4 ++++
 arch/arm/mach-realview/Kconfig | 8 ++++++++
 arch/arm/mach-vexpress/Kconfig | 2 ++
 arch/arm/plat-spear/Kconfig    | 2 ++
 9 files changed, 29 insertions(+), 7 deletions(-)
arch/arm/Kconfig +6 -2
index e85f2b6..303ce90 100644
@@ -639,6 +639,8 @@ config ARCH_TEGRA
 	select GENERIC_GPIO
 	select HAVE_CLK
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select ARCH_HAS_CPUFREQ
 	select USE_OF
@@ -686,6 +688,8 @@ config ARCH_SHMOBILE
 	select CLKDEV_LOOKUP
 	select HAVE_MACH_CLKDEV
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select GENERIC_CLOCKEVENTS
 	select MIGHT_HAVE_CACHE_L2X0
 	select NO_IOPORT
@@ -882,6 +886,8 @@ config ARCH_U8500
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_HAS_CPUFREQ
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Support for ST-Ericsson's Ux500 architecture
@@ -1507,7 +1513,6 @@ config SMP
 	depends on HAVE_SMP
 	depends on MMU
 	select USE_GENERIC_SMP_HELPERS
-	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 	help
 	  This enables support for systems with more than one CPU. If you have
 	  a system with only one CPU, like most personal computers, say N. If
@@ -1620,7 +1625,6 @@ config LOCAL_TIMERS
 	bool "Use local timer interrupts"
 	depends on SMP
 	default y
-	select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT)
 	help
 	  Enable support for local timers on SMP platforms, rather then the
 	  legacy IPI broadcast method.  Local timers allows the system
arch/arm/mach-exynos/Kconfig +2 -0
index 4372075..8f97e92 100644
@@ -15,6 +15,7 @@ config ARCH_EXYNOS4
 	bool "SAMSUNG EXYNOS4"
 	default y
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Samsung EXYNOS4 SoCs based systems
@@ -22,6 +23,7 @@ config ARCH_EXYNOS4
 config ARCH_EXYNOS5
 	bool "SAMSUNG EXYNOS5"
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
 	help
 	  Samsung EXYNOS5 (Cortex-A15) SoC based systems
 
arch/arm/mach-highbank/Kconfig +1 -0
index 0e1d0a4..f1ad1f0 100644
@@ -11,5 +11,6 @@ config ARCH_HIGHBANK
 	select GENERIC_CLOCKEVENTS
 	select HAVE_ARM_SCU
 	select HAVE_SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select SPARSE_IRQ
 	select USE_OF
arch/arm/mach-imx/Kconfig +2 -0
index 519ed57..13f765c 100644
@@ -759,6 +759,8 @@ config SOC_IMX6Q
 	select HAVE_IMX_MMDC
 	select HAVE_IMX_SRC
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MFD_SYSCON
 	select PINCTRL
 	select PINCTRL_IMX6Q
arch/arm/mach-msm/Kconfig +2 -5
index 7902de15..5bff882 100644
@@ -44,7 +44,7 @@ endchoice
 
 config ARCH_MSM8X60
 	bool "MSM8X60"
-	select ARCH_MSM_SCORPIONMP
+	select HAVE_SMP
 	select ARM_GIC
 	select CPU_V7
 	select MSM_V2_TLMM
@@ -55,7 +55,7 @@ config ARCH_MSM8X60
 
 config ARCH_MSM8960
 	bool "MSM8960"
-	select ARCH_MSM_SCORPIONMP
+	select HAVE_SMP
 	select ARM_GIC
 	select CPU_V7
 	select MSM_V2_TLMM
@@ -68,9 +68,6 @@ config MSM_HAS_DEBUG_UART_HS
 
 config MSM_SOC_REV_A
 	bool
-config  ARCH_MSM_SCORPIONMP
-	bool
-	select HAVE_SMP
 
 config  ARCH_MSM_ARM11
 	bool
arch/arm/mach-omap2/Kconfig +4 -0
index a6219ea..b618748 100644
@@ -58,7 +58,9 @@ config ARCH_OMAP4
 	select CPU_V7
 	select ARM_GIC
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
 	select LOCAL_TIMERS if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select PL310_ERRATA_588369
 	select PL310_ERRATA_727915
 	select ARM_ERRATA_720789
@@ -75,6 +77,8 @@ config SOC_OMAP5
 	select CPU_V7
 	select ARM_GIC
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select ARM_CPU_SUSPEND if PM
 	select SOC_HAS_REALTIME_COUNTER
 	select ARM_ARCH_TIMER
arch/arm/mach-realview/Kconfig +8 -0
index c593be4..0c019b7 100644
@@ -13,6 +13,8 @@ config REALVIEW_EB_A9MP
 	depends on MACH_REALVIEW_EB
 	select CPU_V7
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Enable support for the Cortex-A9MPCore tile fitted to the
@@ -24,6 +26,8 @@ config REALVIEW_EB_ARM11MP
 	select CPU_V6K
 	select ARCH_HAS_BARRIERS if SMP
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Enable support for the ARM11MPCore tile fitted to the Realview(R)
@@ -44,6 +48,8 @@ config MACH_REALVIEW_PB11MP
 	select ARM_GIC
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select ARCH_HAS_BARRIERS if SMP
 	help
@@ -86,6 +92,8 @@ config MACH_REALVIEW_PBX
 	select ARM_GIC
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
 	select ZONE_DMA if SPARSEMEM
arch/arm/mach-vexpress/Kconfig +2 -0
index c952960..4f8e0db 100644
@@ -11,6 +11,8 @@ config ARCH_VEXPRESS
 	select HAVE_CLK
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select ICST
 	select MIGHT_HAVE_CACHE_L2X0
 	select NO_IOPORT
arch/arm/plat-spear/Kconfig +2 -0
index 4404f82..a090ea3 100644
@@ -14,6 +14,8 @@ config ARCH_SPEAR13XX
 	select CPU_V7
 	select USE_OF
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select PINCTRL
 	help
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Stephen Boyd
 arch/arm/plat-spear/Kconfig    | 2 ++
arch/arm/plat-spear/Kconfig +0 -0
index 4404f82..a090ea3 100644

arch/arm/plat-spear/Kconfig config ARCH_SPEAR13XX · line 21

Quoted 8 lines
arch/arm/plat-spear/Kconfig +2 -0
@@ -14,6 +14,8 @@ config ARCH_SPEAR13XX
        select CPU_V7
        select USE_OF
        select HAVE_SMP
+       select HAVE_ARM_SCU if SMP
+       select HAVE_ARM_TWD if LOCAL_TIMERS
        select MIGHT_HAVE_CACHE_L2X0
        select PINCTRL
        help

For SPEAr:

Acked-by on v1 1/1
#2 lore raw
In reply to Stephen Boyd
Quoted 25 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

Cc David Brown<[email protected]>
Cc Kukjin Kim<[email protected]>
Cc Linus Walleij<[email protected]>
Cc Pawel Moll<[email protected]>
Cc Rob Herring<[email protected]>
Cc Russell King<[email protected]>
Cc Sascha Hauer<[email protected]>
Cc Shiraz Hashim<[email protected]>
Cc Simon Horman<[email protected]>
Cc Srinidhi Kasagar<[email protected]>
Cc Stephen Warren<[email protected]>
Cc Tony Lindgren<[email protected]>
Cc Viresh Kumar<[email protected]>
Quoted 5 lines

---

Does OMAP5 need to select TWD? I suspect not if it uses the architected timers.

Nope. OMAP5 don't use TWD. Infact the external SCU is also used for A9 SOCs. You might want to check other A15 SOCS for SCU as well.

[..]

Quoted 1 line
  arch/arm/mach-omap2/Kconfig    | 4 ++++

[..]

Quoted 5 lines
arch/arm/mach-omap2/Kconfig +0 -0
index a6219ea..b618748 100644

arch/arm/mach-omap2/Kconfig config ARCH_OMAP4 · line 66

Quoted 9 lines
arch/arm/mach-omap2/Kconfig +2 -0
@@ -58,7 +58,9 @@ config ARCH_OMAP4
  	select CPU_V7
  	select ARM_GIC
  	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
  	select LOCAL_TIMERS if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
  	select PL310_ERRATA_588369
  	select PL310_ERRATA_727915
  	select ARM_ERRATA_720789

Ok.

arch/arm/mach-omap2/Kconfig config SOC_OMAP5 · line 84

Quoted 9 lines
arch/arm/mach-omap2/Kconfig +2 -0
@@ -75,6 +77,8 @@ config SOC_OMAP5
  	select CPU_V7
  	select ARM_GIC
  	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
  	select ARM_CPU_SUSPEND if PM
  	select SOC_HAS_REALTIME_COUNTER
  	select ARM_ARCH_TIMER

Drop this change.

With that fixed, for OMAP changes

#3 lore raw
Quoted 11 lines · Santosh Shilimkar

arch/arm/mach-omap2/Kconfig config SOC_OMAP5 · line 84

Quoted 9 lines
arch/arm/mach-omap2/Kconfig +2 -0
@@ -75,6 +77,8 @@ config SOC_OMAP5
      select CPU_V7
      select ARM_GIC
      select HAVE_SMP
+    select HAVE_ARM_SCU if SMP
+    select HAVE_ARM_TWD if LOCAL_TIMERS
      select ARM_CPU_SUSPEND if PM
      select SOC_HAS_REALTIME_COUNTER
      select ARM_ARCH_TIMER

Drop this change.

Quoted 3 lines

With that fixed, for OMAP changes

Thanks. Will drop both lines in this hunk.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#4 lore raw
In reply to Santosh Shilimkar
Quoted 28 lines · Santosh Shilimkar
Quoted 27 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

Cc David Brown<[email protected]>
Cc Kukjin Kim<[email protected]>
Cc Linus Walleij<[email protected]>
Cc Pawel Moll<[email protected]>
Cc Rob Herring<[email protected]>
Cc Russell King<[email protected]>
Cc Sascha Hauer<[email protected]>
Cc Shiraz Hashim<[email protected]>
Cc Simon Horman<[email protected]>
Cc Srinidhi Kasagar<[email protected]>
Cc Stephen Warren<[email protected]>
Cc Tony Lindgren<[email protected]>
Cc Viresh Kumar<[email protected]>

---

Quoted 6 lines
Quoted 3 lines

Does OMAP5 need to select TWD? I suspect not if it uses the architected timers.

Nope. OMAP5 don't use TWD. Infact the external SCU is also used for A9 SOCs. You might want to check other A15 SOCS for SCU as well.

In that case I am a bit confused by the following result:

# git checkout v3.6
# ARCH=arm make omap2plus_defconfig
# grep '(SOC_OMAP5|_SCU|_TWD|CONFIG_SMP|CONFIG_LOCAL_TIMERS)=' .config
CONFIG_SOC_OMAP5=y
CONFIG_SMP=y
CONFIG_HAVE_ARM_SCU=y
CONFIG_HAVE_ARM_TWD=y
CONFIG_LOCAL_TIMERS=y
#5 lore raw
Quoted 38 lines · Simon Horman
Quoted 28 lines · Santosh Shilimkar
Quoted 27 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

Cc David Brown<[email protected]>
Cc Kukjin Kim<[email protected]>
Cc Linus Walleij<[email protected]>
Cc Pawel Moll<[email protected]>
Cc Rob Herring<[email protected]>
Cc Russell King<[email protected]>
Cc Sascha Hauer<[email protected]>
Cc Shiraz Hashim<[email protected]>
Cc Simon Horman<[email protected]>
Cc Srinidhi Kasagar<[email protected]>
Cc Stephen Warren<[email protected]>
Cc Tony Lindgren<[email protected]>
Cc Viresh Kumar<[email protected]>

---

Quoted 6 lines
Quoted 3 lines

Does OMAP5 need to select TWD? I suspect not if it uses the architected timers.

Nope. OMAP5 don't use TWD. Infact the external SCU is also used for A9 SOCs. You might want to check other A15 SOCS for SCU as well.

In that case I am a bit confused by the following result:

Quoted 8 lines
# git checkout v3.6
# ARCH=arm make omap2plus_defconfig
# grep '(SOC_OMAP5|_SCU|_TWD|CONFIG_SMP|CONFIG_LOCAL_TIMERS)=' .config
CONFIG_SOC_OMAP5=y
CONFIG_SMP=y
CONFIG_HAVE_ARM_SCU=y
CONFIG_HAVE_ARM_TWD=y
CONFIG_LOCAL_TIMERS=y

Thats because omap2plus_defconfig build all the OMAP machines together including OMAP4 and OMAP5.

Regards
Santosh

#6 lore raw
In reply to Stephen Boyd
Quoted 10 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

I think this is the wrong direction as I'd like to see the platform selects shrink. I believe the local timers are run-time enabled now, so can't we just drop the condition and always select TWD and SCU for multi-platform?

Or perhaps we need a CortexA9 config symbol that selects V7, GIC, TWD, SCU, SMP, PL310, errata, etc. rather than duplicating those for every platform.

Rob

Quoted 243 lines
Cc David Brown <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Rob Herring <[email protected]>
Cc Russell King <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc Simon Horman <[email protected]>
Cc Srinidhi Kasagar <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Viresh Kumar <[email protected]>

---

Does OMAP5 need to select TWD? I suspect not if it uses the architected timers.

 arch/arm/Kconfig               | 8 ++++++--
 arch/arm/mach-exynos/Kconfig   | 2 ++
 arch/arm/mach-highbank/Kconfig | 1 +
 arch/arm/mach-imx/Kconfig      | 2 ++
 arch/arm/mach-msm/Kconfig      | 7 ++-----
 arch/arm/mach-omap2/Kconfig    | 4 ++++
 arch/arm/mach-realview/Kconfig | 8 ++++++++
 arch/arm/mach-vexpress/Kconfig | 2 ++
 arch/arm/plat-spear/Kconfig    | 2 ++
 9 files changed, 29 insertions(+), 7 deletions(-)
arch/arm/Kconfig +6 -2
index e85f2b6..303ce90 100644
@@ -639,6 +639,8 @@ config ARCH_TEGRA
 	select GENERIC_GPIO
 	select HAVE_CLK
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select ARCH_HAS_CPUFREQ
 	select USE_OF
@@ -686,6 +688,8 @@ config ARCH_SHMOBILE
 	select CLKDEV_LOOKUP
 	select HAVE_MACH_CLKDEV
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select GENERIC_CLOCKEVENTS
 	select MIGHT_HAVE_CACHE_L2X0
 	select NO_IOPORT
@@ -882,6 +886,8 @@ config ARCH_U8500
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_HAS_CPUFREQ
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Support for ST-Ericsson's Ux500 architecture
@@ -1507,7 +1513,6 @@ config SMP
 	depends on HAVE_SMP
 	depends on MMU
 	select USE_GENERIC_SMP_HELPERS
-	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 	help
 	  This enables support for systems with more than one CPU. If you have
 	  a system with only one CPU, like most personal computers, say N. If
@@ -1620,7 +1625,6 @@ config LOCAL_TIMERS
 	bool "Use local timer interrupts"
 	depends on SMP
 	default y
-	select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT)
 	help
 	  Enable support for local timers on SMP platforms, rather then the
 	  legacy IPI broadcast method.  Local timers allows the system
arch/arm/mach-exynos/Kconfig +2 -0
index 4372075..8f97e92 100644
@@ -15,6 +15,7 @@ config ARCH_EXYNOS4
 	bool "SAMSUNG EXYNOS4"
 	default y
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Samsung EXYNOS4 SoCs based systems
@@ -22,6 +23,7 @@ config ARCH_EXYNOS4
 config ARCH_EXYNOS5
 	bool "SAMSUNG EXYNOS5"
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
 	help
 	  Samsung EXYNOS5 (Cortex-A15) SoC based systems
 
arch/arm/mach-highbank/Kconfig +1 -0
index 0e1d0a4..f1ad1f0 100644
@@ -11,5 +11,6 @@ config ARCH_HIGHBANK
 	select GENERIC_CLOCKEVENTS
 	select HAVE_ARM_SCU
 	select HAVE_SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select SPARSE_IRQ
 	select USE_OF
arch/arm/mach-imx/Kconfig +2 -0
index 519ed57..13f765c 100644
@@ -759,6 +759,8 @@ config SOC_IMX6Q
 	select HAVE_IMX_MMDC
 	select HAVE_IMX_SRC
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MFD_SYSCON
 	select PINCTRL
 	select PINCTRL_IMX6Q
arch/arm/mach-msm/Kconfig +2 -5
index 7902de15..5bff882 100644
@@ -44,7 +44,7 @@ endchoice
 
 config ARCH_MSM8X60
 	bool "MSM8X60"
-	select ARCH_MSM_SCORPIONMP
+	select HAVE_SMP
 	select ARM_GIC
 	select CPU_V7
 	select MSM_V2_TLMM
@@ -55,7 +55,7 @@ config ARCH_MSM8X60
 
 config ARCH_MSM8960
 	bool "MSM8960"
-	select ARCH_MSM_SCORPIONMP
+	select HAVE_SMP
 	select ARM_GIC
 	select CPU_V7
 	select MSM_V2_TLMM
@@ -68,9 +68,6 @@ config MSM_HAS_DEBUG_UART_HS
 
 config MSM_SOC_REV_A
 	bool
-config  ARCH_MSM_SCORPIONMP
-	bool
-	select HAVE_SMP
 
 config  ARCH_MSM_ARM11
 	bool
arch/arm/mach-omap2/Kconfig +4 -0
index a6219ea..b618748 100644
@@ -58,7 +58,9 @@ config ARCH_OMAP4
 	select CPU_V7
 	select ARM_GIC
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
 	select LOCAL_TIMERS if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select PL310_ERRATA_588369
 	select PL310_ERRATA_727915
 	select ARM_ERRATA_720789
@@ -75,6 +77,8 @@ config SOC_OMAP5
 	select CPU_V7
 	select ARM_GIC
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select ARM_CPU_SUSPEND if PM
 	select SOC_HAS_REALTIME_COUNTER
 	select ARM_ARCH_TIMER
arch/arm/mach-realview/Kconfig +8 -0
index c593be4..0c019b7 100644
@@ -13,6 +13,8 @@ config REALVIEW_EB_A9MP
 	depends on MACH_REALVIEW_EB
 	select CPU_V7
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Enable support for the Cortex-A9MPCore tile fitted to the
@@ -24,6 +26,8 @@ config REALVIEW_EB_ARM11MP
 	select CPU_V6K
 	select ARCH_HAS_BARRIERS if SMP
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	help
 	  Enable support for the ARM11MPCore tile fitted to the Realview(R)
@@ -44,6 +48,8 @@ config MACH_REALVIEW_PB11MP
 	select ARM_GIC
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select ARCH_HAS_BARRIERS if SMP
 	help
@@ -86,6 +92,8 @@ config MACH_REALVIEW_PBX
 	select ARM_GIC
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
 	select ZONE_DMA if SPARSEMEM
arch/arm/mach-vexpress/Kconfig +2 -0
index c952960..4f8e0db 100644
@@ -11,6 +11,8 @@ config ARCH_VEXPRESS
 	select HAVE_CLK
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select ICST
 	select MIGHT_HAVE_CACHE_L2X0
 	select NO_IOPORT
arch/arm/plat-spear/Kconfig +2 -0
index 4404f82..a090ea3 100644
@@ -14,6 +14,8 @@ config ARCH_SPEAR13XX
 	select CPU_V7
 	select USE_OF
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select MIGHT_HAVE_CACHE_L2X0
 	select PINCTRL
 	help
#7 lore raw
Quoted 9 lines · Rob Herring
Quoted 8 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Quoted 6 lines
Quoted 2 lines

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

I think this is the wrong direction as I'd like to see the platform selects shrink. I believe the local timers are run-time enabled now, so can't we just drop the condition and always select TWD and SCU for multi-platform?

That sounds fine for multi-platform but it penalizes the "optimized" images made for a particular device that doesn't want any extra code than is necessary. Isn't this why we have the Kconfig language?

Quoted 6 lines

Or perhaps we need a CortexA9 config symbol that selects V7, GIC, TWD, SCU, SMP, PL310, errata, etc. rather than duplicating those for every platform.

This sounds like a good consolidation of lines that can be done in parallel to this patch. Care to send a patch on top?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#8 lore raw
Quoted 12 lines · Stephen Boyd
Quoted 11 lines · Rob Herring
Quoted 10 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

Quoted 9 lines
Quoted 4 lines

I think this is the wrong direction as I'd like to see the platform selects shrink. I believe the local timers are run-time enabled now, so can't we just drop the condition and always select TWD and SCU for multi-platform?

That sounds fine for multi-platform but it penalizes the "optimized" images made for a particular device that doesn't want any extra code than is necessary. Isn't this why we have the Kconfig language?

Yes, but neither of those are very much code. There has to be some threshold.

Quoted 9 lines
Quoted 6 lines

Or perhaps we need a CortexA9 config symbol that selects V7, GIC, TWD, SCU, SMP, PL310, errata, etc. rather than duplicating those for every platform.

This sounds like a good consolidation of lines that can be done in parallel to this patch. Care to send a patch on top?

So I would just go and delete most of the lines you are adding? Sounds like churn to me. We should do this first if we are going to.

Also, your patch is not going to apply once Russell's alphabetizing of selects patch goes in. I'm not sure if that is this merge window or next.

Rob

Acked-by on v1 1/1
#9 lore raw
In reply to Stephen Boyd
Quoted 25 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

Cc David Brown <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Rob Herring <[email protected]>
Cc Russell King <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Shiraz Hashim <[email protected]>
Cc Simon Horman <[email protected]>
Cc Srinidhi Kasagar <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Viresh Kumar <[email protected]>
Quoted 1 line

---

The shmobile portion of this change seems fine to me.

Acked-by on v1 1/1
#10 lore raw
In reply to Stephen Boyd
Quoted 10 lines · Stephen Boyd

The TWD and SCU configs are selected by default as long as SCORPIONMP is false and/or MCT is false. Implementing the logic this way certainly saves lines in the Kconfig but it precludes those machines which select SCORPIONMP or MCT from participating in the single zImage effort because when those machines are combined with other SMP capable machines the TWD and SCU are no longer selected.

Push the select out to the machine entries so that we can compile these machines together and still select the appropriate configs.

[...]

arch/arm/mach-vexpress/Kconfig config ARCH_VEXPRESS · line 18

Quoted 13 lines
arch/arm/mach-vexpress/Kconfig +2 -0
index c952960..4f8e0db 100644
@@ -11,6 +11,8 @@ config ARCH_VEXPRESS
 	select HAVE_CLK
 	select HAVE_PATA_PLATFORM
 	select HAVE_SMP
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if LOCAL_TIMERS
 	select ICST
 	select MIGHT_HAVE_CACHE_L2X0
 	select NO_IOPORT

If you move these two lines before HAVE_CLK so everything stays in alphabetical order ;-) you can add my Acked-by for vexpress:

Thanks!

Pawel