Lines Matching refs:info

43 static int calc_freq(struct spu_gov_info_struct *info)  in calc_freq()  argument
48 cpu = info->policy->cpu; in calc_freq()
51 CALC_LOAD(info->busy_spus, EXP, busy_spus * FIXED_1); in calc_freq()
53 cpu, busy_spus, info->busy_spus); in calc_freq()
55 return info->policy->max * info->busy_spus / FIXED_1; in calc_freq()
60 struct spu_gov_info_struct *info; in spu_gov_work() local
64 info = container_of(work, struct spu_gov_info_struct, work.work); in spu_gov_work()
67 BUG_ON(info->policy == NULL); in spu_gov_work()
69 target_freq = calc_freq(info); in spu_gov_work()
70 __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); in spu_gov_work()
72 delay = usecs_to_jiffies(info->poll_int); in spu_gov_work()
73 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_work()
76 static void spu_gov_init_work(struct spu_gov_info_struct *info) in spu_gov_init_work() argument
78 int delay = usecs_to_jiffies(info->poll_int); in spu_gov_init_work()
79 INIT_DEFERRABLE_WORK(&info->work, spu_gov_work); in spu_gov_init_work()
80 schedule_delayed_work_on(info->policy->cpu, &info->work, delay); in spu_gov_init_work()
83 static void spu_gov_cancel_work(struct spu_gov_info_struct *info) in spu_gov_cancel_work() argument
85 cancel_delayed_work_sync(&info->work); in spu_gov_cancel_work()
91 struct spu_gov_info_struct *info, *affected_info; in spu_gov_govern() local
95 info = &per_cpu(spu_gov_info, cpu); in spu_gov_govern()
117 info->poll_int = POLL_TIME; in spu_gov_govern()
120 spu_gov_init_work(info); in spu_gov_govern()
126 spu_gov_cancel_work(info); in spu_gov_govern()
130 info = &per_cpu(spu_gov_info, i); in spu_gov_govern()
131 info->policy = NULL; in spu_gov_govern()