Re: [PATCH] p4-clockmod: Calculate frequency based on TSC valuefor P4 models 0 and 1

From: Dave Jones
Date: Tue Feb 24 2009 - 11:54:20 EST


On Tue, Feb 24, 2009 at 08:08:58AM +0100, Frans Pop wrote:
> From: Mattias-Christian Ott <ott@xxxxxxxxx>
>
> Commit ed9cbcd40004904dbe61ccc16d6106a7de38c998 reverted an incorrect
> change that resulted in random frequencies being displayed in some cases
> for early P4 models because the MSR_FBC_REGISTER_ID ratio is undefined.
>
> Result of the revert is that for some users the CPU frequency is displayed
> multiplied by a factor 8 in /proc/cpuinfo when p4-clockmod is loaded.
>
> Calculating the frequency from the TSC value should work in all cases.

I already picked this up in cpufreq-next.
Additionally, it needs the chunk below.

(checkpatch also complains about the overlong line in the original
patch which I fixed up before merging).

Dave

diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h
index 2bb6a83..4f5c247 100644
--- a/arch/x86/include/asm/timer.h
+++ b/arch/x86/include/asm/timer.h
@@ -11,8 +11,8 @@ unsigned long native_calibrate_tsc(void);

#ifdef CONFIG_X86_32
extern int timer_ack;
+#endif
extern int recalibrate_cpu_khz(void);
-#endif /* CONFIG_X86_32 */

--
http://www.codemonkey.org.uk
--
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/