Lines Matching refs:cpu_data

162 	struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu);  in teo_update()  local
166 if (cpu_data->time_span_ns >= cpu_data->sleep_length_ns) { in teo_update()
196 cpu_data->total = 0; in teo_update()
205 struct teo_bin *bin = &cpu_data->state_bins[i]; in teo_update()
210 cpu_data->total += bin->hits + bin->intercepts; in teo_update()
212 if (target_residency_ns <= cpu_data->sleep_length_ns) { in teo_update()
219 i = cpu_data->next_recent_idx++; in teo_update()
220 if (cpu_data->next_recent_idx >= NR_RECENT) in teo_update()
221 cpu_data->next_recent_idx = 0; in teo_update()
223 if (cpu_data->recent_idx[i] >= 0) in teo_update()
224 cpu_data->state_bins[cpu_data->recent_idx[i]].recent--; in teo_update()
233 cpu_data->state_bins[idx_timer].hits += PULSE; in teo_update()
234 cpu_data->recent_idx[i] = -1; in teo_update()
236 cpu_data->state_bins[idx_duration].intercepts += PULSE; in teo_update()
237 cpu_data->state_bins[idx_duration].recent++; in teo_update()
238 cpu_data->recent_idx[i] = idx_duration; in teo_update()
241 cpu_data->total += PULSE; in teo_update()
288 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_select() local
308 cpu_data->time_span_ns = local_clock(); in teo_select()
311 cpu_data->sleep_length_ns = duration_ns; in teo_select()
332 struct teo_bin *prev_bin = &cpu_data->state_bins[i-1]; in teo_select()
382 alt_intercepts = 2 * idx_intercept_sum > cpu_data->total - idx_hit_sum; in teo_select()
401 struct teo_bin *bin = &cpu_data->state_bins[i]; in teo_select()
485 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_reflect() local
494 (tick_nohz_idle_got_tick() && cpu_data->sleep_length_ns > TICK_NSEC)) { in teo_reflect()
496 cpu_data->time_span_ns = cpu_data->sleep_length_ns; in teo_reflect()
498 cpu_data->time_span_ns = local_clock() - cpu_data->time_span_ns; in teo_reflect()
510 struct teo_cpu *cpu_data = per_cpu_ptr(&teo_cpus, dev->cpu); in teo_enable_device() local
513 memset(cpu_data, 0, sizeof(*cpu_data)); in teo_enable_device()
516 cpu_data->recent_idx[i] = -1; in teo_enable_device()