return 0;
policy = per_cpu(cpufreq_cpu_policy, cpu);
- if (!policy || !policy->aperf_mperf)
+ if ( !policy || !cpu_has_aperfmperf )
return 0;
switch (flag)
struct cpufreq_policy *policy = info;
unsigned int eax;
- if ( cpu_has_aperfmperf )
- {
- policy->aperf_mperf = 1;
- cpufreq_driver.getavg = get_measured_perf;
- }
-
eax = cpuid_eax(6);
if (eax & 0x2) {
policy->turbo = CPUFREQ_TURBO_ENABLED;
struct cpufreq_policy *policy = info;
unsigned int edx;
- if ( cpu_has_aperfmperf )
- {
- policy->aperf_mperf = 1;
- cpufreq_driver.getavg = get_measured_perf;
- }
-
edx = cpuid_edx(CPUID_FREQ_VOLT_CAPABILITIES);
if ((edx & CPB_CAPABLE) == CPB_CAPABLE) {
policy->turbo = CPUFREQ_TURBO_ENABLED;
if (!cpu_online(cpu) || !(policy = per_cpu(cpufreq_cpu_policy, cpu)))
return 0;
- if (cpufreq_driver.getavg)
- {
- freq_avg = cpufreq_driver.getavg(cpu, flag);
- if (freq_avg > 0)
- return freq_avg;
- }
+ freq_avg = get_measured_perf(cpu, flag);
+ if ( freq_avg > 0 )
+ return freq_avg;
return policy->cur;
}
s8 turbo; /* tristate flag: 0 for unsupported
* -1 for disable, 1 for enabled
* See CPUFREQ_TURBO_* below for defines */
- bool_t aperf_mperf; /* CPU has APERF/MPERF MSRs */
};
DECLARE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_policy);
unsigned int target_freq,
unsigned int relation);
unsigned int (*get)(unsigned int cpu);
- unsigned int (*getavg)(unsigned int cpu, unsigned int flag);
int (*exit)(struct cpufreq_policy *policy);
};