Lines Matching refs:states
11 * wakeups from idle states. Moreover, information about what happened in the
15 * which of the shallower idle states to choose.
98 * @states: Idle states data corresponding to this CPU.
105 struct teo_idle_state states[CPUIDLE_STATE_MAX];
131 u64 lat_ns = drv->states[dev->last_state_idx].exit_latency_ns;
154 * Decay the "early hits" metric for all of the states and find the
155 * states matching the sleep length and the measured idle duration.
158 unsigned int early_hits = cpu_data->states[i].early_hits;
160 cpu_data->states[i].early_hits -= early_hits >> DECAY_SHIFT;
162 if (drv->states[i].target_residency_ns <= cpu_data->sleep_length_ns) {
164 if (drv->states[i].target_residency_ns <= measured_ns)
178 unsigned int hits = cpu_data->states[idx_timer].hits;
179 unsigned int misses = cpu_data->states[idx_timer].misses;
187 cpu_data->states[idx_hit].early_hits += PULSE;
192 cpu_data->states[idx_timer].misses = misses;
193 cpu_data->states[idx_timer].hits = hits;
228 if (drv->states[i].target_residency_ns <= duration_ns)
269 struct cpuidle_state *s = &drv->states[i];
273 * Ignore disabled states with target residencies beyond
287 hits = cpu_data->states[i].hits;
288 misses = cpu_data->states[i].misses;
290 if (early_hits >= cpu_data->states[i].early_hits ||
302 early_hits = cpu_data->states[i].early_hits;
314 if (teo_time_ok(drv->states[idx].target_residency_ns)) {
316 early_hits = cpu_data->states[i].early_hits;
325 hits = cpu_data->states[i].hits;
326 misses = cpu_data->states[i].misses;
336 hits = cpu_data->states[i].hits;
337 misses = cpu_data->states[i].misses;
339 if (early_hits < cpu_data->states[i].early_hits &&
340 teo_time_ok(drv->states[i].target_residency_ns)) {
342 early_hits = cpu_data->states[i].early_hits;
350 * it is more likely that one of the shallower states will match the
359 * shallower states.
366 duration_ns = drv->states[idx].target_residency_ns;
378 idx = 0; /* No states enabled. Must use 0. */
410 if (drv->states[idx].target_residency_ns > avg_ns)
421 if (((drv->states[idx].flags & CPUIDLE_FLAG_POLLING) ||
431 if (idx > 0 && drv->states[idx].target_residency_ns > delta_tick)