cpuidle: Do not substract exit latency from assumed sleep length
authortuukka.tikkanen@linaro.org <tuukka.tikkanen@linaro.org>
Mon, 24 Feb 2014 06:29:34 +0000 (08:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 6 Mar 2014 00:45:59 +0000 (01:45 +0100)
commit61c66d6efa23759f1061d80ced668977fd28337d
tree0c556a46d19be772f3a42931b2e4f30537aa26fa
parent7ac26436677024ab5e57e25c2c83d4c3fc232106
cpuidle: Do not substract exit latency from assumed sleep length

The menu governor statistics update function tries to determine the
amount of time between entry to low power state and the occurrence
of the wakeup event. However, the time measured by the framework
includes exit latency on top of the desired value. This exit latency
is substracted from the measured value to obtain the desired value.

When measured value is not available, the menu governor assumes
the wakeup was caused by the timer and the time is equal to remaining
timer length. No exit latency should be substracted from this value.

This patch prevents the erroneous substraction and clarifies the
associated comment. It also removes one intermediate variable that
serves no purpose.

Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/menu.c