diff mbox

[6/6] ARM: EXYNOS: Register cpuidle device only on Exynos4210 and 5250

Message ID 1403618235-19353-7-git-send-email-t.figa@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomasz Figa June 24, 2014, 1:57 p.m. UTC
Currently, the Exynos cpuidle driver works correctly only on Exynos4210
and 5250. Trying to use it with just one CPU online on any other Exynos
SoC will lead to system failure, due to unsupported AFTR mode on other
SoCs. This patch fixes the problem by registering the driver only on
supported SoCs and letting others simply use default WFI mode until
support for them is added.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
---
 arch/arm/mach-exynos/exynos.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Kim Kukjin July 8, 2014, 2:15 p.m. UTC | #1
Tomasz Figa wrote:
> 
> Currently, the Exynos cpuidle driver works correctly only on Exynos4210
> and 5250. Trying to use it with just one CPU online on any other Exynos
> SoC will lead to system failure, due to unsupported AFTR mode on other
> SoCs. This patch fixes the problem by registering the driver only on
> supported SoCs and letting others simply use default WFI mode until
> support for them is added.
> 
Hmm...I thought other SoCs have no problem on cpuidle except exynos5420 and
exynos5440....something like this would be helpful to avoid system failure.
But unfortunately this conflicts with Pankaj's cleanup cpufreq_init() and
cpuidle_init() patch you've reviewed and I've applied in my local...

I'm going to check which exynos is ok on cpuidle and then sort them out.

Thanks,
Kukjin

> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> ---
>  arch/arm/mach-exynos/exynos.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index f38cf7c..176bbf5 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -173,10 +173,8 @@ static struct platform_device exynos_cpuidle = {
> 
>  void __init exynos_cpuidle_init(void)
>  {
> -	if (soc_is_exynos5440())
> -		return;
> -
> -	platform_device_register(&exynos_cpuidle);
> +	if (soc_is_exynos4210() || soc_is_exynos5250())
> +		platform_device_register(&exynos_cpuidle);
>  }
> 
>  void __init exynos_cpufreq_init(void)
> --
> 1.9.3
Bartlomiej Zolnierkiewicz July 8, 2014, 3:45 p.m. UTC | #2
Hi,

On Tuesday, July 08, 2014 11:15:21 PM Kukjin Kim wrote:
> Tomasz Figa wrote:
> > 
> > Currently, the Exynos cpuidle driver works correctly only on Exynos4210
> > and 5250. Trying to use it with just one CPU online on any other Exynos
> > SoC will lead to system failure, due to unsupported AFTR mode on other
> > SoCs. This patch fixes the problem by registering the driver only on
> > supported SoCs and letting others simply use default WFI mode until
> > support for them is added.
> > 
> Hmm...I thought other SoCs have no problem on cpuidle except exynos5420 and
> exynos5440....something like this would be helpful to avoid system failure.
> But unfortunately this conflicts with Pankaj's cleanup cpufreq_init() and
> cpuidle_init() patch you've reviewed and I've applied in my local...
> 
> I'm going to check which exynos is ok on cpuidle and then sort them out.

Tomasz's patch is correct - currently only Exynos4210 and Exynos5250 work
fine with AFTR mode and upstream kernel (AFTR gets triggered by offlining
CPUs other than CPU0).

[ Exynos4x12 and Exynos3250 need secure firmware support (patches for this
  need to be reworked on top of recent PM/firmware/cpuidle changes).

  Exynos5410 should use big_little cpuidle driver. ]

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Kim Kukjin July 10, 2014, 1:30 p.m. UTC | #3
Bartlomiej Zolnierkiewicz wrote:
> 
> Hi,
> 
Hi Bart,

> On Tuesday, July 08, 2014 11:15:21 PM Kukjin Kim wrote:
> > Tomasz Figa wrote:
> > >
> > > Currently, the Exynos cpuidle driver works correctly only on Exynos4210
> > > and 5250. Trying to use it with just one CPU online on any other Exynos
> > > SoC will lead to system failure, due to unsupported AFTR mode on other
> > > SoCs. This patch fixes the problem by registering the driver only on
> > > supported SoCs and letting others simply use default WFI mode until
> > > support for them is added.
> > >
> > Hmm...I thought other SoCs have no problem on cpuidle except exynos5420 and
> > exynos5440....something like this would be helpful to avoid system failure.
> > But unfortunately this conflicts with Pankaj's cleanup cpufreq_init() and
> > cpuidle_init() patch you've reviewed and I've applied in my local...
> >
> > I'm going to check which exynos is ok on cpuidle and then sort them out.
> 
> Tomasz's patch is correct - currently only Exynos4210 and Exynos5250 work
> fine with AFTR mode and upstream kernel (AFTR gets triggered by offlining
> CPUs other than CPU0).
> 
> [ Exynos4x12 and Exynos3250 need secure firmware support (patches for this
>   need to be reworked on top of recent PM/firmware/cpuidle changes).
> 
>   Exynos5410 should use big_little cpuidle driver. ]
> 
Agreed that this is required at this moment.
I will take this into fixes for 3.16.

Thanks,
Kukjin
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index f38cf7c..176bbf5 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -173,10 +173,8 @@  static struct platform_device exynos_cpuidle = {
 
 void __init exynos_cpuidle_init(void)
 {
-	if (soc_is_exynos5440())
-		return;
-
-	platform_device_register(&exynos_cpuidle);
+	if (soc_is_exynos4210() || soc_is_exynos5250())
+		platform_device_register(&exynos_cpuidle);
 }
 
 void __init exynos_cpufreq_init(void)