All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: fix cpuidle on sh7724, possibly others
@ 2011-12-07  8:38 Guennadi Liakhovetski
  2011-12-07 11:12 ` Guennadi Liakhovetski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2011-12-07  8:38 UTC (permalink / raw)
  To: linux-sh

cpuidle has been broken on sh7724 and, possibly, other SuperH SoCs since 

commit f533c3d340536198a4889a42a68d6c0d79a504e7
Author: Paul Mundt <lethal@linux-sh.org>
Date:   Fri Oct 16 17:20:58 2009 +0900

    sh: Idle loop chainsawing for SMP-based light sleep.

i.e., since 2.6.33-rc1. The reason is a missing local_irq_enable() on the 
path, actually entering a sleep mode. This patch adds the missing call.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

This fixes one of the problem with cpuidle on sh. When applied (suitably 
adjusted) directly after f533c3d340536198a4889a42a68d6c0d79a504e7, it does 
fix the problem. However, since that commit cpuidle has been broken (at 
least for my configuration) at least once more. This time bisection points 
out at

commit 03625e7107cde46e2851557ec06426799e6ae7f2
Author: Magnus Damm <damm@opensource.se>
Date:   Fri Oct 30 04:24:32 2009 +0000

    sh: Use RSMEM for sleep code on sh7724

Still investigating.

diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c
index 1cc257c..e58640a 100644
--- a/arch/sh/kernel/cpu/shmobile/cpuidle.c
+++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c
@@ -48,6 +48,7 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev,
 	 */
 	k = min_t(int, allowed_state, requested_state);
 
+	local_irq_enable();
 	before = ktime_get();
 	sh_mobile_call_standby(cpuidle_mode[k]);
 	after = ktime_get();

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-09  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07  8:38 [PATCH] sh: fix cpuidle on sh7724, possibly others Guennadi Liakhovetski
2011-12-07 11:12 ` Guennadi Liakhovetski
2011-12-09  8:54 ` Paul Mundt
2011-12-09  9:27 ` Guennadi Liakhovetski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.