Lines Matching refs:policy

60  * struct global_pstate_info -	Per policy data structure to maintain history of
75 * @policy: Associated CPUFreq policy
85 struct cpufreq_policy *policy;
216 static inline void reset_gpstates(struct cpufreq_policy *policy)
218 struct global_pstate_info *gpstates = policy->driver_data;
378 static ssize_t cpuinfo_nominal_freq_show(struct cpufreq_policy *policy,
398 static ssize_t name##_show(struct cpufreq_policy *policy, char *buf) \
400 struct chip *chip = per_cpu(chip_info, policy->cpu); \
674 struct cpufreq_policy *policy = gpstates->policy;
685 * it back to one of the policy->cpus
687 if (!cpumask_test_cpu(raw_smp_processor_id(), policy->cpus)) {
689 add_timer_on(&gpstates->timer, cpumask_first(policy->cpus));
703 reset_gpstates(policy);
714 reset_gpstates(policy);
739 * mask policy->cpus
741 static int powernv_cpufreq_target_index(struct cpufreq_policy *policy,
746 struct global_pstate_info *gpstates = policy->driver_data;
786 reset_gpstates(policy);
796 reset_gpstates(policy);
822 * if current CPU is within policy->cpus (core)
824 smp_call_function_any(policy->cpus, set_pstate, &freq_data, 1);
828 static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy)
834 base = cpu_first_thread_sibling(policy->cpu);
837 cpumask_set_cpu(base + i, policy->cpus);
839 kn = kernfs_find_and_get(policy->kobj.sd, throttle_attr_grp.name);
843 ret = sysfs_create_group(&policy->kobj, &throttle_attr_grp);
846 policy->cpu);
853 policy->freq_table = powernv_freqs;
854 policy->fast_switch_possible = true;
864 policy->driver_data = gpstates;
867 gpstates->policy = policy;
877 static int powernv_cpufreq_cpu_exit(struct cpufreq_policy *policy)
880 kfree(policy->driver_data);
910 struct cpufreq_policy *policy;
926 policy = cpufreq_cpu_get(cpu);
927 if (!policy)
929 index = cpufreq_table_find_index_c(policy, policy->cur);
930 powernv_cpufreq_target_index(policy, index);
931 cpumask_andnot(&mask, &mask, policy->cpus);
932 cpufreq_cpu_put(policy);
1011 static void powernv_cpufreq_stop_cpu(struct cpufreq_policy *policy)
1014 struct global_pstate_info *gpstates = policy->driver_data;
1018 smp_call_function_single(policy->cpu, set_pstate, &freq_data, 1);
1023 static unsigned int powernv_fast_switch(struct cpufreq_policy *policy,
1029 index = cpufreq_table_find_index_dl(policy, target_freq);