Lines Matching refs:policy
60 * @policy: cpufreq policy.
73 struct cpufreq_policy *policy;
237 struct cpufreq_policy *policy = cpufreq_cdev->policy;
239 freq = cpufreq_quick_get(policy->cpu);
241 for_each_cpu(cpu, policy->related_cpus) {
256 trace_thermal_power_cpu_get_power_simple(policy->cpu, *power);
285 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus);
320 struct cpufreq_policy *policy = cpufreq_cdev->policy;
327 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state,
334 struct cpufreq_policy *policy;
340 policy = cpufreq_cdev->policy;
341 if (!cpumask_equal(policy->related_cpus, em_span_cpus(em))) {
342 pr_err("The span of pd %*pbl is misaligned with cpufreq policy %*pbl\n",
344 cpumask_pr_args(policy->related_cpus));
372 unsigned int num_cpus = cpumask_weight(cpufreq_cdev->policy->related_cpus);
393 struct cpufreq_policy *policy;
414 policy = cpufreq_cdev->policy;
415 if (policy->freq_table_sorted == CPUFREQ_TABLE_SORTED_ASCENDING)
420 return policy->freq_table[idx].frequency;
503 * @policy: cpufreq policy
504 * Normally this should be same as cpufreq policy->related_cpus.
505 * @em: Energy Model of the cpufreq policy
517 struct cpufreq_policy *policy,
528 if (IS_ERR_OR_NULL(policy)) {
529 pr_err("%s: cpufreq policy isn't valid: %p\n", __func__, policy);
533 dev = get_cpu_device(policy->cpu);
535 pr_warn("No cpu device for cpu %d\n", policy->cpu);
539 i = cpufreq_table_count_valid_entries(policy);
550 cpufreq_cdev->policy = policy;
574 if (policy->freq_table_sorted == CPUFREQ_TABLE_UNSORTED) {
581 ret = freq_qos_add_request(&policy->constraints,
616 * @policy: cpufreq policy
626 cpufreq_cooling_register(struct cpufreq_policy *policy)
628 return __cpufreq_cooling_register(NULL, policy, NULL);
634 * @policy: cpufreq policy
649 of_cpufreq_cooling_register(struct cpufreq_policy *policy)
651 struct device_node *np = of_get_cpu_node(policy->cpu, NULL);
656 policy->cpu);
661 struct em_perf_domain *em = em_cpu_get(policy->cpu);
663 cdev = __cpufreq_cooling_register(np, policy, em);
666 policy->cpu, PTR_ERR(cdev));