Re: [discuss] [PATCH] x86_64: fix cpu MHz reporting onconstant_tsc cpus
From: Joerg Roedel
Date: Thu Mar 15 2007 - 12:52:21 EST
On Thu, Mar 15, 2007 at 12:01:09AM +0100, Andi Kleen wrote:
> 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.
Yes. You are right. I will fix that and send a new version. Thanks for
the review.
Joerg
--
Joerg Roedel
Operating System Research Center
AMD Saxony LLC & Co. KG
-
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/