exynos4: cpuidle does never enter AFTR state with CONFIG_THUMB2_KERNEL=y
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro PMWG Kernel |
Confirmed
|
High
|
Chander Mohan Kashyap |
Bug Description
Despite the cpuidle framework choose the state1 for exynos which is the AFTR state, the cpu_suspend returns always true, meaning the AFTR shutdown sequence has been aborted and the cpu0 was never off.
How to reproduce ?
Go to the tag: tracking-
Add a trace in the cpuidle driver:
diff --git a/arch/
index cff0595..73b3d17 100644
--- a/arch/
+++ b/arch/
@@ -113,7 +113,8 @@ static int exynos4_
- cpu_suspend(0, idle_finisher);
+ if (!cpu_suspend(0, idle_finisher))
+ printk(KERN_ERR "cpu_suspend succeed\n");
#ifdef CONFIG_SMP
Offline cpu1 and wait for this trace, it will never come.
Changed in linaro-power-kernel: | |
importance: | Undecided → High |
assignee: | nobody → Chander Mohan Kashyap (chander-kashyap) |
Changed in linaro-power-kernel: | |
status: | New → Confirmed |
It is working as per expectations. cpu_suspend never returns in successful scenario. To test it please do the following:
1:
Apply the following patch: By this patch we can see the actual numbers of AFTER state.
diff --git a/arch/ arm/mach- exynos/ cpuidle. c b/arch/ arm/mach- exynos/ cpuidle. c arm/mach- exynos/ cpuidle. c arm/mach- exynos/ cpuidle. c cpu_arch_ register( void)
index cff0595..3bcf7c2 100644
--- a/arch/
+++ b/arch/
@@ -85,9 +85,11 @@ static void restore_
return;
}
+static int counter; unsigned long flags)
cpu_do_ idle();
static int idle_finisher(
{
+ counter --;
return 1;
}
@@ -112,6 +114,7 @@ static int exynos4_ enter_core0_ aftr(struct cpuidle_device *dev, LOWPWR_ CFG;
__raw_ writel( tmp, S5P_CENTRAL_ SEQ_CONFIGURATI ON);
tmp &= ~S5P_CENTRAL_
+ counter ++;
cpu_pm_ enter() ;
cpu_suspend( 0, idle_finisher);
@@ -119,7 +122,7 @@ static int exynos4_ enter_core0_ aftr(struct cpuidle_device *dev,
scu_enable( S5P_VA_ SCU);
cpu_pm_ exit();
restore_ cpu_arch_ register( );
#endif
-
+ printk("\n Actual Counter = %d \n", counter);
/*
2:
Applying this patch we can confirm that AFTR works, as system will hang when it enters the AFTR state.
--- a/arch/ arm/plat- samsung/ s5p-sleep. S arm/plat- samsung/ s5p-sleep. S cpu_resume) s3c_cpu_ resume)
+++ b/arch/
@@ -71,6 +71,7 @@ ENTRY(s3c_
str r2, [r1, #L2X0_CTRL]
resume_l2on:
#endif
+ b .
b cpu_resume
ENDPROC(
#ifdef CONFIG_CACHE_L2X0