Lines Matching refs:policy

63  * @policy: cpufreq policy.
77 struct cpufreq_policy *policy;
211 struct cpufreq_policy *policy = cpufreq_cdev->policy;
214 freq = cpufreq_quick_get(policy->cpu);
217 u32 ncpus = cpumask_weight(policy->related_cpus);
222 for_each_cpu(cpu, policy->related_cpus) {
242 trace_thermal_power_cpu_get_power(policy->related_cpus, freq,
275 num_cpus = cpumask_weight(cpufreq_cdev->policy->cpus);
309 struct cpufreq_policy *policy = cpufreq_cdev->policy;
316 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state,
323 struct cpufreq_policy *policy;
329 policy = cpufreq_cdev->policy;
330 if (!cpumask_equal(policy->related_cpus, em_span_cpus(em))) {
331 pr_err("The span of pd %*pbl is misaligned with cpufreq policy %*pbl\n",
333 cpumask_pr_args(policy->related_cpus));
352 struct cpufreq_policy *policy;
364 policy = cpufreq_cdev->policy;
365 if (policy->freq_table_sorted == CPUFREQ_TABLE_SORTED_ASCENDING)
370 return policy->freq_table[idx].frequency;
446 cpus = cpufreq_cdev->policy->related_cpus;
449 capacity /= cpufreq_cdev->policy->cpuinfo.max_freq;
468 * @policy: cpufreq policy
469 * Normally this should be same as cpufreq policy->related_cpus.
470 * @em: Energy Model of the cpufreq policy
482 struct cpufreq_policy *policy,
493 dev = get_cpu_device(policy->cpu);
495 pr_warn("No cpu device for cpu %d\n", policy->cpu);
500 if (IS_ERR_OR_NULL(policy)) {
501 pr_err("%s: cpufreq policy isn't valid: %p\n", __func__, policy);
505 i = cpufreq_table_count_valid_entries(policy);
516 cpufreq_cdev->policy = policy;
517 num_cpus = cpumask_weight(policy->related_cpus);
549 if (policy->freq_table_sorted == CPUFREQ_TABLE_UNSORTED) {
556 ret = freq_qos_add_request(&policy->constraints,
590 * @policy: cpufreq policy
600 cpufreq_cooling_register(struct cpufreq_policy *policy)
602 return __cpufreq_cooling_register(NULL, policy, NULL);
608 * @policy: cpufreq policy
619 * It also takes into account, if property present in policy CPU node, the
626 of_cpufreq_cooling_register(struct cpufreq_policy *policy)
628 struct device_node *np = of_get_cpu_node(policy->cpu, NULL);
633 policy->cpu);
638 struct em_perf_domain *em = em_cpu_get(policy->cpu);
640 cdev = __cpufreq_cooling_register(np, policy, em);
643 policy->cpu, PTR_ERR(cdev));