diff mbox

ARM: Push selects for TWD/SCU into machine entries

Message ID 1349340644-13937-1-git-send-email-sboyd@codeaurora.org (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Boyd Oct. 4, 2012, 8:50 a.m. UTC
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.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: David Brown <davidb@codeaurora.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Viresh Kumar <viresh.linux@gmail.com>
---

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

Comments

Viresh Kumar Oct. 4, 2012, 8:52 a.m. UTC | #1
On Thu, Oct 4, 2012 at 2:20 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>  arch/arm/plat-spear/Kconfig    | 2 ++

> diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig
> index 4404f82..a090ea3 100644
> --- a/arch/arm/plat-spear/Kconfig
> +++ b/arch/arm/plat-spear/Kconfig
> @@ -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: Viresh Kumar <viresh.kumar@linaro.org>
Santosh Shilimkar Oct. 4, 2012, 9:11 a.m. UTC | #2
On Thursday 04 October 2012 02:20 PM, Stephen Boyd wrote:
> 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.
>
> Signed-off-by: Stephen Boyd<sboyd@codeaurora.org>
> Cc: David Brown<davidb@codeaurora.org>
> Cc: Kukjin Kim<kgene.kim@samsung.com>
> Cc: Linus Walleij<linus.walleij@linaro.org>
> Cc: Pawel Moll<pawel.moll@arm.com>
> Cc: Rob Herring<rob.herring@calxeda.com>
> Cc: Russell King<linux@arm.linux.org.uk>
> Cc: Sascha Hauer<kernel@pengutronix.de>
> Cc: Shiraz Hashim<shiraz.hashim@st.com>
> Cc: Simon Horman<horms@verge.net.au>
> Cc: Srinidhi Kasagar<srinidhi.kasagar@stericsson.com>
> Cc: Stephen Warren<swarren@wwwdotorg.org>
> Cc: Tony Lindgren<tony@atomide.com>
> Cc: Viresh Kumar<viresh.linux@gmail.com>
> ---
>
> 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.

[..]

>   arch/arm/mach-omap2/Kconfig    | 4 ++++

[..]

> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index a6219ea..b618748 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -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.

> @@ -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

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Rob Herring Oct. 4, 2012, 1:05 p.m. UTC | #3
On 10/04/2012 03:50 AM, Stephen Boyd wrote:
> 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

> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Shiraz Hashim <shiraz.hashim@st.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Viresh Kumar <viresh.linux@gmail.com>
> ---
> 
> 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(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index e85f2b6..303ce90 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index 4372075..8f97e92 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -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
>  
> diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
> index 0e1d0a4..f1ad1f0 100644
> --- a/arch/arm/mach-highbank/Kconfig
> +++ b/arch/arm/mach-highbank/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index 519ed57..13f765c 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
> index 7902de15..5bff882 100644
> --- a/arch/arm/mach-msm/Kconfig
> +++ b/arch/arm/mach-msm/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index a6219ea..b618748 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
> index c593be4..0c019b7 100644
> --- a/arch/arm/mach-realview/Kconfig
> +++ b/arch/arm/mach-realview/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
> index c952960..4f8e0db 100644
> --- a/arch/arm/mach-vexpress/Kconfig
> +++ b/arch/arm/mach-vexpress/Kconfig
> @@ -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
> diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig
> index 4404f82..a090ea3 100644
> --- a/arch/arm/plat-spear/Kconfig
> +++ b/arch/arm/plat-spear/Kconfig
> @@ -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
>
Stephen Boyd Oct. 4, 2012, 7:01 p.m. UTC | #4
On 10/04/12 02:11, Santosh Shilimkar wrote:
>> @@ -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
>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Thanks. Will drop both lines in this hunk.
Stephen Boyd Oct. 4, 2012, 7:22 p.m. UTC | #5
On 10/04/12 06:05, Rob Herring wrote:
> On 10/04/2012 03:50 AM, Stephen Boyd wrote:
>> 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?

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?

>
> 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?
Simon Horman Oct. 5, 2012, 1:12 a.m. UTC | #6
On Thu, Oct 04, 2012 at 02:41:46PM +0530, Santosh Shilimkar wrote:
> On Thursday 04 October 2012 02:20 PM, Stephen Boyd wrote:
> >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.
> >
> >Signed-off-by: Stephen Boyd<sboyd@codeaurora.org>
> >Cc: David Brown<davidb@codeaurora.org>
> >Cc: Kukjin Kim<kgene.kim@samsung.com>
> >Cc: Linus Walleij<linus.walleij@linaro.org>
> >Cc: Pawel Moll<pawel.moll@arm.com>
> >Cc: Rob Herring<rob.herring@calxeda.com>
> >Cc: Russell King<linux@arm.linux.org.uk>
> >Cc: Sascha Hauer<kernel@pengutronix.de>
> >Cc: Shiraz Hashim<shiraz.hashim@st.com>
> >Cc: Simon Horman<horms@verge.net.au>
> >Cc: Srinidhi Kasagar<srinidhi.kasagar@stericsson.com>
> >Cc: Stephen Warren<swarren@wwwdotorg.org>
> >Cc: Tony Lindgren<tony@atomide.com>
> >Cc: Viresh Kumar<viresh.linux@gmail.com>
> >---
> >
> >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
Simon Horman Oct. 5, 2012, 1:13 a.m. UTC | #7
On Thu, Oct 04, 2012 at 01:50:44AM -0700, Stephen Boyd wrote:
> 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.
> 
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Pawel Moll <pawel.moll@arm.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Shiraz Hashim <shiraz.hashim@st.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Viresh Kumar <viresh.linux@gmail.com>
> ---

The shmobile portion of this change seems fine to me.

Acked-by: Simon Horman <horms@verge.net.au>
Santosh Shilimkar Oct. 5, 2012, 6:42 a.m. UTC | #8
On Friday 05 October 2012 06:42 AM, Simon Horman wrote:
> On Thu, Oct 04, 2012 at 02:41:46PM +0530, Santosh Shilimkar wrote:
>> On Thursday 04 October 2012 02:20 PM, Stephen Boyd wrote:
>>> 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.
>>>
>>> Signed-off-by: Stephen Boyd<sboyd@codeaurora.org>
>>> Cc: David Brown<davidb@codeaurora.org>
>>> Cc: Kukjin Kim<kgene.kim@samsung.com>
>>> Cc: Linus Walleij<linus.walleij@linaro.org>
>>> Cc: Pawel Moll<pawel.moll@arm.com>
>>> Cc: Rob Herring<rob.herring@calxeda.com>
>>> Cc: Russell King<linux@arm.linux.org.uk>
>>> Cc: Sascha Hauer<kernel@pengutronix.de>
>>> Cc: Shiraz Hashim<shiraz.hashim@st.com>
>>> Cc: Simon Horman<horms@verge.net.au>
>>> Cc: Srinidhi Kasagar<srinidhi.kasagar@stericsson.com>
>>> Cc: Stephen Warren<swarren@wwwdotorg.org>
>>> Cc: Tony Lindgren<tony@atomide.com>
>>> Cc: Viresh Kumar<viresh.linux@gmail.com>
>>> ---
>>>
>>> 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

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

Regards
Santosh
Pawel Moll Oct. 8, 2012, 12:15 p.m. UTC | #9
On Thu, 2012-10-04 at 09:50 +0100, Stephen Boyd wrote:
> 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.
[...]
> diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
> index c952960..4f8e0db 100644
> --- a/arch/arm/mach-vexpress/Kconfig
> +++ b/arch/arm/mach-vexpress/Kconfig
> @@ -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:

Acked-by: Pawel Moll <pawel.moll@arm.com>

Thanks!

Pawel
Rob Herring Oct. 8, 2012, 12:56 p.m. UTC | #10
On 10/04/2012 02:22 PM, Stephen Boyd wrote:
> On 10/04/12 06:05, Rob Herring wrote:
>> On 10/04/2012 03:50 AM, Stephen Boyd wrote:
>>> 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?
> 
> 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.

>>
>> 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
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e85f2b6..303ce90 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 4372075..8f97e92 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -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
 
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 0e1d0a4..f1ad1f0 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -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
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 519ed57..13f765c 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -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
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 7902de15..5bff882 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -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
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index a6219ea..b618748 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -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
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index c593be4..0c019b7 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -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
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index c952960..4f8e0db 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -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
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig
index 4404f82..a090ea3 100644
--- a/arch/arm/plat-spear/Kconfig
+++ b/arch/arm/plat-spear/Kconfig
@@ -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