Lines Matching refs:policy
29 * longrun_get_policy - get the current LongRun policy
30 * @policy: struct cpufreq_policy where current policy is written into
32 * Reads the current LongRun policy by access to MSR_TMTA_LONGRUN_FLAGS
35 static void longrun_get_policy(struct cpufreq_policy *policy)
42 policy->policy = CPUFREQ_POLICY_PERFORMANCE;
44 policy->policy = CPUFREQ_POLICY_POWERSAVE;
53 policy->min = policy->max = longrun_high_freq;
55 policy->min = longrun_low_freq + msr_lo *
57 policy->max = longrun_low_freq + msr_hi *
60 policy->cpu = 0;
65 * longrun_set_policy - sets a new CPUFreq policy
66 * @policy: new policy
68 * Sets a new CPUFreq policy on LongRun-capable processors. This function
71 static int longrun_set_policy(struct cpufreq_policy *policy)
76 if (!policy)
83 pctg_lo = (policy->min - longrun_low_freq) /
85 pctg_hi = (policy->max - longrun_low_freq) /
97 switch (policy->policy) {
119 * longrun_verify_poliy - verifies a new CPUFreq policy
120 * @policy: the policy to verify
122 * Validates a new CPUFreq policy. This function has to be called with
125 static int longrun_verify_policy(struct cpufreq_policy_data *policy)
127 if (!policy)
130 policy->cpu = 0;
131 cpufreq_verify_within_cpu_limits(policy);
252 static int longrun_cpu_init(struct cpufreq_policy *policy)
257 if (policy->cpu != 0)
265 /* cpuinfo and default policy values */
266 policy->cpuinfo.min_freq = longrun_low_freq;
267 policy->cpuinfo.max_freq = longrun_high_freq;
268 longrun_get_policy(policy);