Messages in this thread |  | | | Date | Thu, 4 Mar 2010 13:17:34 -0800 | | From | Andrew Morton <> | | Subject | Re: [PATCH 1/3] [cpufreq] [retry 1] Add APERF/MPERF support for AMD processors |
| |
On Wed, 3 Mar 2010 14:56:56 -0600 Mark Langsdorf <mark.langsdorf@amd.com> wrote:
> +unsigned int get_measured_perf(struct cpufreq_policy *policy, > + unsigned int cpu) > +{ > + struct aperfmperf perf; > + unsigned long ratio; > + unsigned int retval; > + > + if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1)) > + return 0; > + > + ratio = calc_aperfmperf_ratio(&per_cpu(acfreq_old_perf, cpu), &perf); > + per_cpu(acfreq_old_perf, cpu) = perf; > + > + retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT; > + > + return retval; > +} > +EXPORT_SYMBOL_GPL(get_measured_perf);
That's a pretty crappy name for a kernel-wide identifier. cpufreq_get_measured_perf() would be typical and better.
|  |