diff mbox series

[v3] ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs

Message ID 20190321063152.4819-1-m.szyprowski@samsung.com (mailing list archive)
State Accepted
Commit 60d1f775a6f474b137ec1f3db14e02574484fca4
Headers show
Series [v3] ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs | expand

Commit Message

Marek Szyprowski March 21, 2019, 6:31 a.m. UTC
Support for Exynos5420/5422/5800 SoCs requires MCPM to properly boot all
CPU cores on all currectly supported platforms: Peach Pit (Exynos5420),
Odroid XU3/XU3lite/XU4/HC1 (Exynos5422) and Peach Pi (Exynos5800).
Without it some CPU cores fail to come online. Remove then the ability to
disable MCPM and make it mandatory when Exynos542x/5800 support is
enabled.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
v3: remove CONFIG_EXYNOS5420_MCPM symbol from defconfigs too
v2: rebased on top of the current exynos-next
---
 arch/arm/configs/exynos_defconfig   |  1 -
 arch/arm/configs/multi_v7_defconfig |  1 -
 arch/arm/mach-exynos/Kconfig        | 12 +++---------
 arch/arm/mach-exynos/Makefile       |  2 +-
 arch/arm/mach-exynos/suspend.c      | 12 ++++--------
 5 files changed, 8 insertions(+), 20 deletions(-)

Comments

Olof Johansson April 8, 2019, 5:56 p.m. UTC | #1
On Wed, Mar 20, 2019 at 11:32 PM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
>
> Support for Exynos5420/5422/5800 SoCs requires MCPM to properly boot all
> CPU cores on all currectly supported platforms: Peach Pit (Exynos5420),
> Odroid XU3/XU3lite/XU4/HC1 (Exynos5422) and Peach Pi (Exynos5800).
> Without it some CPU cores fail to come online. Remove then the ability to
> disable MCPM and make it mandatory when Exynos542x/5800 support is
> enabled.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> v3: remove CONFIG_EXYNOS5420_MCPM symbol from defconfigs too
> v2: rebased on top of the current exynos-next
> ---
>  arch/arm/configs/exynos_defconfig   |  1 -
>  arch/arm/configs/multi_v7_defconfig |  1 -
>  arch/arm/mach-exynos/Kconfig        | 12 +++---------
>  arch/arm/mach-exynos/Makefile       |  2 +-
>  arch/arm/mach-exynos/suspend.c      | 12 ++++--------
>  5 files changed, 8 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
> index d635edfb6ff2..c95c54284da2 100644
> --- a/arch/arm/configs/exynos_defconfig
> +++ b/arch/arm/configs/exynos_defconfig
> @@ -9,7 +9,6 @@ CONFIG_MODULE_UNLOAD=y
>  CONFIG_PARTITION_ADVANCED=y
>  CONFIG_ARCH_EXYNOS=y
>  CONFIG_ARCH_EXYNOS3=y
> -CONFIG_EXYNOS5420_MCPM=y
>  CONFIG_SMP=y
>  CONFIG_BIG_LITTLE=y
>  CONFIG_NR_CPUS=8
> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> index c75051b9392c..e4b5fd46fdef 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -33,7 +33,6 @@ CONFIG_MACH_BERLIN_BG2CD=y
>  CONFIG_MACH_BERLIN_BG2Q=y
>  CONFIG_ARCH_DIGICOLOR=y
>  CONFIG_ARCH_EXYNOS=y
> -CONFIG_EXYNOS5420_MCPM=y
>  CONFIG_ARCH_HIGHBANK=y
>  CONFIG_ARCH_HISI=y
>  CONFIG_ARCH_HI3xxx=y
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index b40963cf91c7..62b734a8092b 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -106,21 +106,15 @@ config SOC_EXYNOS5420
>         bool "SAMSUNG EXYNOS5420"
>         default y
>         depends on ARCH_EXYNOS5
> +       select MCPM
> +       select ARM_CCI400_PORT_CTRL
> +       select ARM_CPU_SUSPEND

This breaks !SMP builds now:

http://arm-soc.lixom.net/buildlogs/next/next-20190408/buildall.arm.multi_v7_nosmp_defconfig.log.failed

Please use "select MCPM if SMP" instead.


-Olof
Marek Szyprowski April 9, 2019, 9:49 a.m. UTC | #2
Hi Olof and Krzysztof,

On 2019-04-08 19:56, Olof Johansson wrote:
> On Wed, Mar 20, 2019 at 11:32 PM Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
>> Support for Exynos5420/5422/5800 SoCs requires MCPM to properly boot all
>> CPU cores on all currectly supported platforms: Peach Pit (Exynos5420),
>> Odroid XU3/XU3lite/XU4/HC1 (Exynos5422) and Peach Pi (Exynos5800).
>> Without it some CPU cores fail to come online. Remove then the ability to
>> disable MCPM and make it mandatory when Exynos542x/5800 support is
>> enabled.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> v3: remove CONFIG_EXYNOS5420_MCPM symbol from defconfigs too
>> v2: rebased on top of the current exynos-next
>> ---
>>   arch/arm/configs/exynos_defconfig   |  1 -
>>   arch/arm/configs/multi_v7_defconfig |  1 -
>>   arch/arm/mach-exynos/Kconfig        | 12 +++---------
>>   arch/arm/mach-exynos/Makefile       |  2 +-
>>   arch/arm/mach-exynos/suspend.c      | 12 ++++--------
>>   5 files changed, 8 insertions(+), 20 deletions(-)
>>
>> diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
>> index d635edfb6ff2..c95c54284da2 100644
>> --- a/arch/arm/configs/exynos_defconfig
>> +++ b/arch/arm/configs/exynos_defconfig
>> @@ -9,7 +9,6 @@ CONFIG_MODULE_UNLOAD=y
>>   CONFIG_PARTITION_ADVANCED=y
>>   CONFIG_ARCH_EXYNOS=y
>>   CONFIG_ARCH_EXYNOS3=y
>> -CONFIG_EXYNOS5420_MCPM=y
>>   CONFIG_SMP=y
>>   CONFIG_BIG_LITTLE=y
>>   CONFIG_NR_CPUS=8
>> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
>> index c75051b9392c..e4b5fd46fdef 100644
>> --- a/arch/arm/configs/multi_v7_defconfig
>> +++ b/arch/arm/configs/multi_v7_defconfig
>> @@ -33,7 +33,6 @@ CONFIG_MACH_BERLIN_BG2CD=y
>>   CONFIG_MACH_BERLIN_BG2Q=y
>>   CONFIG_ARCH_DIGICOLOR=y
>>   CONFIG_ARCH_EXYNOS=y
>> -CONFIG_EXYNOS5420_MCPM=y
>>   CONFIG_ARCH_HIGHBANK=y
>>   CONFIG_ARCH_HISI=y
>>   CONFIG_ARCH_HI3xxx=y
>> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
>> index b40963cf91c7..62b734a8092b 100644
>> --- a/arch/arm/mach-exynos/Kconfig
>> +++ b/arch/arm/mach-exynos/Kconfig
>> @@ -106,21 +106,15 @@ config SOC_EXYNOS5420
>>          bool "SAMSUNG EXYNOS5420"
>>          default y
>>          depends on ARCH_EXYNOS5
>> +       select MCPM
>> +       select ARM_CCI400_PORT_CTRL
>> +       select ARM_CPU_SUSPEND
> This breaks !SMP builds now:
>
> http://arm-soc.lixom.net/buildlogs/next/next-20190408/buildall.arm.multi_v7_nosmp_defconfig.log.failed

Thanks for spotting this issue.

> Please use "select MCPM if SMP" instead.

Krzysztof: if possible please drop this patch and I will send v4 with 
this issue fixed. Fixing is almost equivalent to a revert, so there is 
no point in making an incremental patch.

Best regards
Krzysztof Kozlowski April 9, 2019, 1:13 p.m. UTC | #3
On Tue, Apr 09, 2019 at 11:49:56AM +0200, Marek Szyprowski wrote:
> Hi Olof and Krzysztof,
> 
> On 2019-04-08 19:56, Olof Johansson wrote:
> > On Wed, Mar 20, 2019 at 11:32 PM Marek Szyprowski
> > <m.szyprowski@samsung.com> wrote:
> >> Support for Exynos5420/5422/5800 SoCs requires MCPM to properly boot all
> >> CPU cores on all currectly supported platforms: Peach Pit (Exynos5420),
> >> Odroid XU3/XU3lite/XU4/HC1 (Exynos5422) and Peach Pi (Exynos5800).
> >> Without it some CPU cores fail to come online. Remove then the ability to
> >> disable MCPM and make it mandatory when Exynos542x/5800 support is
> >> enabled.
> >>
> >> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >> ---
> >> v3: remove CONFIG_EXYNOS5420_MCPM symbol from defconfigs too
> >> v2: rebased on top of the current exynos-next
> >> ---
> >>   arch/arm/configs/exynos_defconfig   |  1 -
> >>   arch/arm/configs/multi_v7_defconfig |  1 -
> >>   arch/arm/mach-exynos/Kconfig        | 12 +++---------
> >>   arch/arm/mach-exynos/Makefile       |  2 +-
> >>   arch/arm/mach-exynos/suspend.c      | 12 ++++--------
> >>   5 files changed, 8 insertions(+), 20 deletions(-)
> >>
> >> diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
> >> index d635edfb6ff2..c95c54284da2 100644
> >> --- a/arch/arm/configs/exynos_defconfig
> >> +++ b/arch/arm/configs/exynos_defconfig
> >> @@ -9,7 +9,6 @@ CONFIG_MODULE_UNLOAD=y
> >>   CONFIG_PARTITION_ADVANCED=y
> >>   CONFIG_ARCH_EXYNOS=y
> >>   CONFIG_ARCH_EXYNOS3=y
> >> -CONFIG_EXYNOS5420_MCPM=y
> >>   CONFIG_SMP=y
> >>   CONFIG_BIG_LITTLE=y
> >>   CONFIG_NR_CPUS=8
> >> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> >> index c75051b9392c..e4b5fd46fdef 100644
> >> --- a/arch/arm/configs/multi_v7_defconfig
> >> +++ b/arch/arm/configs/multi_v7_defconfig
> >> @@ -33,7 +33,6 @@ CONFIG_MACH_BERLIN_BG2CD=y
> >>   CONFIG_MACH_BERLIN_BG2Q=y
> >>   CONFIG_ARCH_DIGICOLOR=y
> >>   CONFIG_ARCH_EXYNOS=y
> >> -CONFIG_EXYNOS5420_MCPM=y
> >>   CONFIG_ARCH_HIGHBANK=y
> >>   CONFIG_ARCH_HISI=y
> >>   CONFIG_ARCH_HI3xxx=y
> >> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> >> index b40963cf91c7..62b734a8092b 100644
> >> --- a/arch/arm/mach-exynos/Kconfig
> >> +++ b/arch/arm/mach-exynos/Kconfig
> >> @@ -106,21 +106,15 @@ config SOC_EXYNOS5420
> >>          bool "SAMSUNG EXYNOS5420"
> >>          default y
> >>          depends on ARCH_EXYNOS5
> >> +       select MCPM
> >> +       select ARM_CCI400_PORT_CTRL
> >> +       select ARM_CPU_SUSPEND
> > This breaks !SMP builds now:
> >
> > http://arm-soc.lixom.net/buildlogs/next/next-20190408/buildall.arm.multi_v7_nosmp_defconfig.log.failed
> 
> Thanks for spotting this issue.
> 
> > Please use "select MCPM if SMP" instead.
> 
> Krzysztof: if possible please drop this patch and I will send v4 with 
> this issue fixed. Fixing is almost equivalent to a revert, so there is 
> no point in making an incremental patch.

I dropped this patch, thanks!

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index d635edfb6ff2..c95c54284da2 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -9,7 +9,6 @@  CONFIG_MODULE_UNLOAD=y
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_EXYNOS=y
 CONFIG_ARCH_EXYNOS3=y
-CONFIG_EXYNOS5420_MCPM=y
 CONFIG_SMP=y
 CONFIG_BIG_LITTLE=y
 CONFIG_NR_CPUS=8
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index c75051b9392c..e4b5fd46fdef 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -33,7 +33,6 @@  CONFIG_MACH_BERLIN_BG2CD=y
 CONFIG_MACH_BERLIN_BG2Q=y
 CONFIG_ARCH_DIGICOLOR=y
 CONFIG_ARCH_EXYNOS=y
-CONFIG_EXYNOS5420_MCPM=y
 CONFIG_ARCH_HIGHBANK=y
 CONFIG_ARCH_HISI=y
 CONFIG_ARCH_HI3xxx=y
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b40963cf91c7..62b734a8092b 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -106,21 +106,15 @@  config SOC_EXYNOS5420
 	bool "SAMSUNG EXYNOS5420"
 	default y
 	depends on ARCH_EXYNOS5
+	select MCPM
+	select ARM_CCI400_PORT_CTRL
+	select ARM_CPU_SUSPEND
 
 config SOC_EXYNOS5800
 	bool "SAMSUNG EXYNOS5800"
 	default y
 	depends on SOC_EXYNOS5420
 
-config EXYNOS5420_MCPM
-	bool "Exynos5420 Multi-Cluster PM support"
-	depends on MCPM && SOC_EXYNOS5420
-	select ARM_CCI400_PORT_CTRL
-	select ARM_CPU_SUSPEND
-	help
-	  This is needed to provide CPU and cluster power management
-	  on Exynos5420 implementing big.LITTLE.
-
 config EXYNOS_CPU_SUSPEND
 	bool
 	select ARM_CPU_SUSPEND
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index cd00c82a1add..fb381d69f8d1 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -18,5 +18,5 @@  plus_sec := $(call as-instr,.arch_extension sec,+sec)
 AFLAGS_exynos-smc.o		:=-Wa,-march=armv7-a$(plus_sec)
 AFLAGS_sleep.o			:=-Wa,-march=armv7-a$(plus_sec)
 
-obj-$(CONFIG_EXYNOS5420_MCPM)	+= mcpm-exynos.o
+obj-$(CONFIG_SOC_EXYNOS5420)	+= mcpm-exynos.o
 CFLAGS_mcpm-exynos.o		+= -march=armv7-a
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index c521af625e40..712669e648c4 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -268,10 +268,8 @@  static int exynos5420_cpu_suspend(unsigned long arg)
 	unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
 	unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
 
-	if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) {
-		mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);
-		mcpm_cpu_suspend();
-	}
+	mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);
+	mcpm_cpu_suspend();
 
 	pr_info("Failed to suspend the system\n");
 
@@ -351,8 +349,7 @@  static void exynos5420_pm_prepare(void)
 	exynos_pm_enter_sleep_mode();
 
 	/* ensure at least INFORM0 has the resume address */
-	if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM))
-		pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0);
+	pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0);
 
 	tmp = pmu_raw_readl(EXYNOS_L2_OPTION(0));
 	tmp &= ~EXYNOS_L2_USE_RETENTION;
@@ -455,8 +452,7 @@  static void exynos5420_prepare_pm_resume(void)
 	mpidr = read_cpuid_mpidr();
 	cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
 
-	if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM))
-		WARN_ON(mcpm_cpu_powered_up());
+	WARN_ON(mcpm_cpu_powered_up());
 
 	if (IS_ENABLED(CONFIG_HW_PERF_EVENTS) && cluster != 0) {
 		/*