From: Mathieu Desnoyers Date: Sun, 30 Oct 2005 22:59:25 +0000 (-0800) Subject: [PATCH] i386 and x86_64 TSC set_cyc2ns_scale imprecision X-Git-Tag: v2.6.15-rc1~59^2~15^2~175 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dacb16b1a034fa7a0b868ee30758119fbfd90bc1;p=pandora-kernel.git [PATCH] i386 and x86_64 TSC set_cyc2ns_scale imprecision I just found out that some precision is unnecessarily lost in the arch/i386/kernel/timers/timer_tsc.c:set_cyc2ns_scale function. It uses a cpu_mhz parameter when it could use a cpu_khz. In the specific case of an Intel P4 running at 3001.171 Mhz, the truncation to 3001 Mhz leads to an imprecision of 19 microseconds per second : this is very sad for a timer with nearly nanosecond accuracy. Fix the x86_64 architecture too. Cc: george anzinger Cc: john stultz Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed