diff options
author | Len Brown <len.brown@intel.com> | 2008-10-22 23:20:05 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 23:20:05 -0400 |
commit | 4538fad56ee1c16bce0294b5647d2551f0e03164 (patch) | |
tree | bbfe1b95eb38f2cf160c6521dc32f9a9dbc82cd2 /drivers/cpuidle/cpuidle.c | |
parent | ebd7e45f6d27556c94216024212a462aaf899ecb (diff) | |
parent | 89cedfefca1d446ee2598fd3bcbb23ee3802e26a (diff) | |
download | op-kernel-dev-4538fad56ee1c16bce0294b5647d2551f0e03164.zip op-kernel-dev-4538fad56ee1c16bce0294b5647d2551f0e03164.tar.gz |
Merge branch 'cpuidle' into test
Diffstat (limited to 'drivers/cpuidle/cpuidle.c')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 5ce07b5..bb6e3b3 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -56,7 +56,11 @@ static void cpuidle_idle_call(void) if (pm_idle_old) pm_idle_old(); else +#if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE) + default_idle(); +#else local_irq_enable(); +#endif return; } @@ -67,8 +71,11 @@ static void cpuidle_idle_call(void) target_state = &dev->states[next_state]; /* enter the state and update stats */ - dev->last_residency = target_state->enter(dev, target_state); dev->last_state = target_state; + dev->last_residency = target_state->enter(dev, target_state); + if (dev->last_state) + target_state = dev->last_state; + target_state->time += (unsigned long long)dev->last_residency; target_state->usage++; |