android_kernel_xiaomi_sm8350/arch
Tim Mann 7feacd5334 [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 <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:13 -08:00
..
alpha [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
arm [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
arm26 [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
cris [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
frv [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
h8300 [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
i386 [PATCH] x86: fix cpu_khz with clock=pit 2005-11-13 18:14:13 -08:00
ia64 [IA64-SGI] set altix preferred console 2005-11-11 11:24:26 -08:00
m32r [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
m68k [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
m68knommu [PATCH] m68knommu: move some platform irq support out of irq.h 2005-11-07 08:00:47 -08:00
mips [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
parisc [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
powerpc [PATCH] powerpc-xmon-build-fix 2005-11-13 18:14:13 -08:00
ppc [PATCH] ppc32: Add support for handling PCI interrupts on MPC834x PCI expansion card 2005-11-13 18:14:13 -08:00
ppc64 [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel 2005-11-11 22:25:39 +11:00
s390 [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sh [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sh64 [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
sparc [SPARC]: Use ARRAY_SIZE macro 2005-11-09 12:03:05 -08:00
sparc64 [SBUSFB]: implement ->compat_ioctl 2005-11-12 12:11:12 -08:00
um Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
v850 [PATCH] sched: disable preempt in idle tasks 2005-11-09 07:56:33 -08:00
x86_64 [PATCH] x86_64 two timer entries in /sys 2005-11-13 18:14:10 -08:00
xtensa Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00