lkml.org 
[lkml]   [2010]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2010-03-04 22:21    [from the cache]
©2003-2011 Jasper Spaans