From: Andrew Morton <akpm@linux-foundation.org>
To: Mark Langsdorf <mark.langsdorf@amd.com>
Cc: <linux-kernel@vger.kernel.org>, <cpufreq@vger.kernel.org>,
<bhavna.sarathy@amd.com>, <joachim.deguara@amd.com>
Subject: Re: [PATCH 1/3] [cpufreq] [retry 1] Add APERF/MPERF support for AMD processors
Date: Thu, 4 Mar 2010 13:17:34 -0800 [thread overview]
Message-ID: <20100304131734.7e3fb7f4.akpm@linux-foundation.org> (raw)
In-Reply-To: <201003031456.56205.mark.langsdorf@amd.com>
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.
prev parent reply other threads:[~2010-03-04 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 20:56 Mark Langsdorf
2010-03-04 21:17 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100304131734.7e3fb7f4.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bhavna.sarathy@amd.com \
--cc=cpufreq@vger.kernel.org \
--cc=joachim.deguara@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.langsdorf@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®