Re: [discuss] [PATCH] x86_64: fix cpu MHz reporting on constant_tsc cpus

From: Andi Kleen
Date: Wed Mar 14 2007 - 19:01:39 EST


On Tuesday 13 March 2007 11:00, Joerg Roedel wrote:
> From: Mark Langsdorf <mark.langsdorf@xxxxxxx>
> From: Joerg Roedel <joerg.roedel@xxxxxxx>
>
> This patch fixes the reporting of cpu_mhz in /proc/cpuinfo on CPUs with
> a constant TSC rate and a kernel with disabled cpufreq.
>
> Signed-off-by: Mark Langsdorf <mark.langsdorf@xxxxxxx>
> Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
>

+ cpu_khz = tsc_khz;
+ if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) &&
+ nmi_known_cpu()) {
+ cpu_khz = tsc_calibrate_cpu_khz();
+ }


I don't think this will do the right thing on Intel CPUs of which tsc_calibrate_cpu_khz()
knows nothing about.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/