diff options
author | Alex Frid <afrid@nvidia.com> | 2012-03-02 17:49:18 -0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-03-06 20:06:27 -0800 |
commit | 045dc9ab34b32922e8cb41a2baa22b30b4307588 (patch) | |
tree | f587974203df0492918405a29d27a3c1983b3eb5 /arch/arm/mach-tegra/cpuidle-t3.c | |
parent | 80ac449838f3654a4345e1cf78884de8c410ba2d (diff) |
ARM: tegra: power: Don't enter LP2 if not in NOHZ mode
Prevent Tegra3 secondary CPU entry to LP2 state when scheduler tick
is not switched to NOHZ mode, yet.
Bug 945658
Change-Id: I654f7aac0e545ecb557005cc4efad4317689e091
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/87937
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Tested-by: Thomas Cherry <tcherry@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle-t3.c')
-rw-r--r-- | arch/arm/mach-tegra/cpuidle-t3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-t3.c b/arch/arm/mach-tegra/cpuidle-t3.c index c132107a718e..c6a50a542d8c 100644 --- a/arch/arm/mach-tegra/cpuidle-t3.c +++ b/arch/arm/mach-tegra/cpuidle-t3.c @@ -331,6 +331,7 @@ static void tegra3_idle_enter_lp2_cpu_n(struct cpuidle_device *dev, ktime_t entry_time; struct tegra_twd_context twd_context; bool sleep_completed = false; + struct tick_sched *ts = tick_get_tick_sched(dev->cpu); if (!tegra_twd_get_state(&twd_context)) { unsigned long twd_rate = clk_get_rate(twd_clk); @@ -351,7 +352,8 @@ static void tegra3_idle_enter_lp2_cpu_n(struct cpuidle_device *dev, } if (!tegra_is_lp2_timer_ready(dev->cpu) || - (request < state->target_residency)) { + (request < state->target_residency) || + (!ts) || (ts->nohz_mode == NOHZ_MODE_INACTIVE)) { /* * Not enough time left to enter LP2, or wake timer not ready */ |