Lines Matching full: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) in longrun_get_policy() argument
42 policy->policy = CPUFREQ_POLICY_PERFORMANCE; in longrun_get_policy()
44 policy->policy = CPUFREQ_POLICY_POWERSAVE; in longrun_get_policy()
53 policy->min = policy->max = longrun_high_freq; in longrun_get_policy()
55 policy->min = longrun_low_freq + msr_lo * in longrun_get_policy()
57 policy->max = longrun_low_freq + msr_hi * in longrun_get_policy()
60 policy->cpu = 0; in longrun_get_policy()
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) in longrun_set_policy() argument
76 if (!policy) in longrun_set_policy()
83 pctg_lo = (policy->min - longrun_low_freq) / in longrun_set_policy()
85 pctg_hi = (policy->max - longrun_low_freq) / in longrun_set_policy()
97 switch (policy->policy) { in longrun_set_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) in longrun_verify_policy() argument
127 if (!policy) in longrun_verify_policy()
130 policy->cpu = 0; in longrun_verify_policy()
131 cpufreq_verify_within_cpu_limits(policy); in longrun_verify_policy()
252 static int longrun_cpu_init(struct cpufreq_policy *policy) in longrun_cpu_init() argument
257 if (policy->cpu != 0) in longrun_cpu_init()
265 /* cpuinfo and default policy values */ in longrun_cpu_init()
266 policy->cpuinfo.min_freq = longrun_low_freq; in longrun_cpu_init()
267 policy->cpuinfo.max_freq = longrun_high_freq; in longrun_cpu_init()
268 longrun_get_policy(policy); in longrun_cpu_init()