]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] i386: Prevent early access to TSC to avoid crash on TSCless systems
authorThomas Gleixner <tglx@linutronix.de>
Sat, 24 Mar 2007 22:02:49 +0000 (23:02 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 24 Mar 2007 22:45:53 +0000 (15:45 -0700)
commit1524790941cb518cdd5bc55bb7bffa0e89ab2309
tree5efaefd34302050ef6d530dafc20635c7ad2842b
parent83fb409bfb27e6578808f14a4a00482c340a8c1f
[PATCH] i386: Prevent early access to TSC to avoid crash on TSCless systems

commit e19a30b45b08b24a39087465ff98d902aa2b53e6 removed the check for
cpu_khz from sched_clock(), which prevented early access to the TSC by
non obvious magic.

This is harmless as long as the CPU has a TSC. On TSCless systems this
results in an illegal instruction trap.

Replace tsc_disabled and tsc_unstable by tsc_enabled, which is only set
when the tsc is available and not unstable.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/tsc.c