]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: OMAP4: CPUidle: add synchronization for coupled idle states
authorKevin Hilman <khilman@ti.com>
Thu, 15 Mar 2012 00:26:17 +0000 (17:26 -0700)
committerKevin Hilman <khilman@ti.com>
Wed, 25 Jul 2012 23:06:04 +0000 (16:06 -0700)
commit5b4d5bcc68940497722d98d99abee72a0ab1d6f1
tree62e03aa78d40e7b47157b03b4d5c6e2e7bb00cd5
parentdd3ad97c5621aa853843dd5e6783ca787466158c
ARM: OMAP4: CPUidle: add synchronization for coupled idle states

With coupled idle states, a failure for any CPU to hit a low power
state must be coordinated such that all CPUs abort.

On OMAP4, when entering a coupled state, CPU0 has to wait for CPU1 to
enter its low power state before it can enter its low power state.

This is implemented by letting CPU0 wait for the CPU1 powerdomain to
hit off.  However, there are conditions where CPU1 might abort/fail
and not hit off while CPU0 is waiting for it.  For example, a CPU1
wakeup or a failed attempt to hit off due to hardware conditions.

To avoid the deadlock where CPU0 would continually wait for CPU1 to
hit off-mode, this patch adds a flag to signal when each CPU has come
out of its low-power state.  CPU0 then checks whether CPU1 has hit off
*or* has already completed its attempt to hit off.  If the latter,
CPU0 must abort its attempt to hit a low-power state so the coupled
state enter method can return.

In addition, cpuidle_coupled_parallel_barrier() is used to ensure the
clearing of the 'done' flag is synchronized on all CPUs.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/cpuidle44xx.c