Lines Matching refs:policy
62 * @policy: cpufreq policy.
75 struct cpufreq_policy *policy;
225 struct cpufreq_policy *policy = cpufreq_cdev->policy;
227 freq = cpufreq_quick_get(policy->cpu);
229 for_each_cpu(cpu, policy->related_cpus) {
244 trace_thermal_power_cpu_get_power_simple(policy->cpu, *power);
272 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus);
302 struct cpufreq_policy *policy = cpufreq_cdev->policy;
309 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state,
316 struct cpufreq_policy *policy;
322 policy = cpufreq_cdev->policy;
323 if (!cpumask_equal(policy->related_cpus, em_span_cpus(em))) {
324 pr_err("The span of pd %*pbl is misaligned with cpufreq policy %*pbl\n",
326 cpumask_pr_args(policy->related_cpus));
354 unsigned int num_cpus = cpumask_weight(cpufreq_cdev->policy->related_cpus);
375 struct cpufreq_policy *policy;
387 policy = cpufreq_cdev->policy;
388 if (policy->freq_table_sorted == CPUFREQ_TABLE_SORTED_ASCENDING)
393 return policy->freq_table[idx].frequency;
468 cpus = cpufreq_cdev->policy->related_cpus;
479 * @policy: cpufreq policy
480 * Normally this should be same as cpufreq policy->related_cpus.
481 * @em: Energy Model of the cpufreq policy
493 struct cpufreq_policy *policy,
504 if (IS_ERR_OR_NULL(policy)) {
505 pr_err("%s: cpufreq policy isn't valid: %p\n", __func__, policy);
509 dev = get_cpu_device(policy->cpu);
511 pr_warn("No cpu device for cpu %d\n", policy->cpu);
515 i = cpufreq_table_count_valid_entries(policy);
526 cpufreq_cdev->policy = policy;
550 if (policy->freq_table_sorted == CPUFREQ_TABLE_UNSORTED) {
557 ret = freq_qos_add_request(&policy->constraints,
592 * @policy: cpufreq policy
602 cpufreq_cooling_register(struct cpufreq_policy *policy)
604 return __cpufreq_cooling_register(NULL, policy, NULL);
610 * @policy: cpufreq policy
625 of_cpufreq_cooling_register(struct cpufreq_policy *policy)
627 struct device_node *np = of_get_cpu_node(policy->cpu, NULL);
632 policy->cpu);
637 struct em_perf_domain *em = em_cpu_get(policy->cpu);
639 cdev = __cpufreq_cooling_register(np, policy, em);
642 policy->cpu, PTR_ERR(cdev));