Lines Matching full:pd
76 struct em_perf_domain *pd; in set_pd_power_limit() local
82 pd = em_cpu_get(dtpm_cpu->cpu); in set_pd_power_limit()
84 cpumask_and(&cpus, cpu_online_mask, to_cpumask(pd->cpus)); in set_pd_power_limit()
88 for (i = 0; i < pd->nr_perf_states; i++) { in set_pd_power_limit()
90 power = pd->table[i].power * MICROWATT_PER_MILLIWATT * nr_cpus; in set_pd_power_limit()
96 freq = pd->table[i - 1].frequency; in set_pd_power_limit()
100 power_limit = pd->table[i - 1].power * in set_pd_power_limit()
109 struct em_perf_domain *pd; in get_pd_power_uw() local
114 pd = em_cpu_get(dtpm_cpu->cpu); in get_pd_power_uw()
116 cpumask_and(&cpus, cpu_online_mask, to_cpumask(pd->cpus)); in get_pd_power_uw()
119 for (i = 0; i < pd->nr_perf_states; i++) { in get_pd_power_uw()
121 if (pd->table[i].frequency < freq) in get_pd_power_uw()
124 return pd->table[i].power * in get_pd_power_uw()
150 struct em_perf_domain *pd; in cpuhp_dtpm_cpu_offline() local
158 pd = em_cpu_get(cpu); in cpuhp_dtpm_cpu_offline()
159 if (!pd) in cpuhp_dtpm_cpu_offline()
164 power_sub(dtpm, pd); in cpuhp_dtpm_cpu_offline()
182 struct em_perf_domain *pd; in cpuhp_dtpm_cpu_online() local
191 pd = em_cpu_get(cpu); in cpuhp_dtpm_cpu_online()
192 if (!pd) in cpuhp_dtpm_cpu_online()
197 return power_add(dtpm, pd); in cpuhp_dtpm_cpu_online()
219 ret = power_add(dtpm, pd); in cpuhp_dtpm_cpu_online()
225 pd->table[pd->nr_perf_states - 1].frequency); in cpuhp_dtpm_cpu_online()
232 power_sub(dtpm, pd); in cpuhp_dtpm_cpu_online()