From: Tim Mann Date: Mon, 14 Nov 2005 00:06:54 +0000 (-0800) Subject: [PATCH] x86: fix cpu_khz with clock=pit X-Git-Tag: v2.6.15-rc2~181 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7feacd53347c04aee789ba5d632eda0c3fc421c4;p=pandora-kernel.git [PATCH] x86: fix cpu_khz with clock=pit Fix http://bugzilla.kernel.org/show_bug.cgi?id=5546 The cpu_khz global is not initialized and remains 0 if you boot with clock=pit, even if the processor does have a TSC. This may have bad ramifications since the variable is used in various places scattered around the kernel, though I didn't check them all to see if they can tolerate cpu_khz = 0. You can observe the problem by doing "cat /proc/cpuinfo"; the cpu MHz line says 0.000. The fix is trivial; call init_cpu_khz() from init_pit(), just as it's called from the timers/timer_foo.c:init_foo() for other values of foo. Cc: john stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed