cpuidle: poll state can measure residency
authortuukka.tikkanen@linaro.org <tuukka.tikkanen@linaro.org>
Mon, 24 Feb 2014 06:29:37 +0000 (08:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Mar 2014 11:55:17 +0000 (12:55 +0100)
For some platforms, a poll state is inserted in the cpuidle driver states.
The flags for the state do not indicate that timekeeping is not affected.
As the state does not do anything apart from calling cpu_relax(), the
times returned by ktime_get should remain valid. Add the missing flag.

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

index 06dbe7c86199808aefdf3d9e6b447c0e0b697b1c..136d6a283e0a3818846eab4e78e7e9245b7d6f07 100644 (file)
@@ -209,7 +209,7 @@ static void poll_idle_init(struct cpuidle_driver *drv)
        state->exit_latency = 0;
        state->target_residency = 0;
        state->power_usage = -1;
-       state->flags = 0;
+       state->flags = CPUIDLE_FLAG_TIME_VALID;
        state->enter = poll_idle;
        state->disabled = false;
 }