exynos5 : cpu_suspend for cpuidle broken

Bug #1171253 reported by Daniel Lezcano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro PMWG Kernel
Confirmed
Critical
Rony Nandy

Bug Description

When the cpu exits the AFTR state after the cpu_suspend. The kernel hangs.

How to reproduce ?

set cpu1 offline:

echo 0 > /sys/devices/system/cpu/cpu1/online

Wait awhile the cpu0 enters the state1 then => hang !

Changed in linaro-power-kernel:
importance: Undecided → Critical
Amit Kucheria (amitk)
Changed in linaro-power-kernel:
assignee: nobody → Chander Mohan Kashyap (chander-kashyap)
Revision history for this message
Chander Mohan Kashyap (chander-kashyap) wrote :

It has two reasons:
1: flush_cache_all has been replaced by flush_cache_louis in "suspend.c". This is not working on exynos5250. So when cpu0 enters cpuidle it hangs.
Fix: The fix for this is to call flush_cache_all in "cpuidle.c".
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index fcfe025..a70b53a 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -21,6 +21,7 @@
 #include <asm/suspend.h>
 #include <asm/unified.h>
 #include <asm/cpuidle.h>
+#include <asm/cacheflush.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-pmu.h>

@@ -89,6 +90,8 @@ static void restore_cpu_arch_register(void)

 static int idle_finisher(unsigned long flags)
 {
+ if (soc_is_exynos5250())
+ flush_cache_all();
        cpu_do_idle();
        return 1;
 }

2: u-boot in arndaleboard with ubuntu package is booting cpu in HYP mode. so while coming out of cpuidle cpu0 in not in HYP mode or some other misbehaviour.
Fix: use mainline u-boot which is not booting cpu in HYP mode.
As of now diden't found solution to fix cpuidle with cpus in HYP mode.

Revision history for this message
Daniel Lezcano (daniel-lezcano) wrote :

I did the modification in the cpuidle driver and used the u-boot before the commit introducing the cpu booting in hypervisor mode [1] from the u-boot for arndale [2].

I confirm the AFTR state works with this workaround.

IIUC, the cpu_suspend is not complete as it does not handle the restore for when the cpu is in Hypervisor mode, right ?

I will keep this bug opened until I see a fix for that.

[1] https://git.linaro.org/gitweb?p=people/ronynandy/u-boot-arndale.git;a=commit;h=affeaad51746944e8c356091b12ff9c9c6183c4a

[2] https://git.linaro.org/gitweb?p=people/ronynandy/u-boot-arndale.git;a=summary

Changed in linaro-power-kernel:
status: New → Confirmed
Revision history for this message
Chander Mohan Kashyap (chander-kashyap) wrote :

cpuidle on exynos is breking after enabling HYP mode in u-boot.

Changed in linaro-power-kernel:
assignee: Chander Mohan Kashyap (chander-kashyap) → nobody
assignee: nobody → Rony Nandy (rony-nandy)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.