[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100304131734.7e3fb7f4.akpm@linux-foundation.org>
Date: Thu, 4 Mar 2010 13:17:34 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Mark Langsdorf <mark.langsdorf@....com>
Cc: <linux-kernel@...r.kernel.org>, <cpufreq@...r.kernel.org>,
<bhavna.sarathy@....com>, <joachim.deguara@....com>
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@....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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists