Re: [PATCH 1/3] [cpufreq] [retry 1] Add APERF/MPERF support for AMD processors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 3 Mar 2010 14:56:56 -0600
Mark Langsdorf <mark.langsdorf@xxxxxxx> 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 cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux