Skip to content

Commit 4b2f0b0

Browse files
tuukka.tikkanen@linaro.orgrafaeljw
authored andcommitted
cpuidle: poll state can measure residency
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>
1 parent 96e9518 commit 4b2f0b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/cpuidle/driver.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static void poll_idle_init(struct cpuidle_driver *drv)
209209
state->exit_latency = 0;
210210
state->target_residency = 0;
211211
state->power_usage = -1;
212-
state->flags = 0;
212+
state->flags = CPUIDLE_FLAG_TIME_VALID;
213213
state->enter = poll_idle;
214214
state->disabled = false;
215215
}

0 commit comments

Comments
 (0)