Lines Matching refs:cpu_data
119 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_update() local
123 if (cpu_data->time_span_ns >= cpu_data->sleep_length_ns) { in teo_update()
158 unsigned int early_hits = cpu_data->states[i].early_hits; in teo_update()
160 cpu_data->states[i].early_hits -= early_hits >> DECAY_SHIFT; in teo_update()
162 if (drv->states[i].target_residency_ns <= cpu_data->sleep_length_ns) { in teo_update()
178 unsigned int hits = cpu_data->states[idx_timer].hits; in teo_update()
179 unsigned int misses = cpu_data->states[idx_timer].misses; in teo_update()
187 cpu_data->states[idx_hit].early_hits += PULSE; in teo_update()
192 cpu_data->states[idx_timer].misses = misses; in teo_update()
193 cpu_data->states[idx_timer].hits = hits; in teo_update()
200 cpu_data->intervals[cpu_data->interval_idx++] = measured_ns; in teo_update()
201 if (cpu_data->interval_idx >= INTERVALS) in teo_update()
202 cpu_data->interval_idx = 0; in teo_update()
243 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_select() local
255 cpu_data->time_span_ns = local_clock(); in teo_select()
258 cpu_data->sleep_length_ns = duration_ns; in teo_select()
287 hits = cpu_data->states[i].hits; in teo_select()
288 misses = cpu_data->states[i].misses; in teo_select()
290 if (early_hits >= cpu_data->states[i].early_hits || in teo_select()
302 early_hits = cpu_data->states[i].early_hits; in teo_select()
316 early_hits = cpu_data->states[i].early_hits; in teo_select()
325 hits = cpu_data->states[i].hits; in teo_select()
326 misses = cpu_data->states[i].misses; in teo_select()
336 hits = cpu_data->states[i].hits; in teo_select()
337 misses = cpu_data->states[i].misses; in teo_select()
339 if (early_hits < cpu_data->states[i].early_hits && in teo_select()
342 early_hits = cpu_data->states[i].early_hits; in teo_select()
388 u64 val = cpu_data->intervals[i]; in teo_select()
445 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_reflect() local
454 (tick_nohz_idle_got_tick() && cpu_data->sleep_length_ns > TICK_NSEC)) { in teo_reflect()
456 cpu_data->time_span_ns = cpu_data->sleep_length_ns; in teo_reflect()
458 cpu_data->time_span_ns = local_clock() - cpu_data->time_span_ns; in teo_reflect()
470 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_enable_device() local
473 memset(cpu_data, 0, sizeof(*cpu_data)); in teo_enable_device()
476 cpu_data->intervals[i] = U64_MAX; in teo_enable_device()