cputimer: Allow MP synchronized TSC to become cputimer on x86_64
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 21 Jun 2013 01:26:37 +0000 (09:26 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 21 Jun 2013 01:43:00 +0000 (09:43 +0800)
commit8d23b56caf513f5c15f56fb053479cc00fe2eaf4
tree11ff6ce0fa03043a89cfb9aa9fe8708117d3fd69
parent62e1ddd29c72cd531f86af0ec858cc5cfcd77ed7
cputimer: Allow MP synchronized TSC to become cputimer on x86_64

sysclock_t stays as 32bits, as suggested by dillon@.

The TSC cputimer frequency is scaled down TSC frequency (less or equal
to 128Mhz), which makes 32bits sysclock_t counter hold at least 33
seconds.

The TSC cputimer is obviously faster than other cputimers, e.g. HPET or
ACPI timer, so it has the highest priority as of this commit.  It is
enabled by default, if MP synchronized TSC is detected.  It could be
disabled by setting tunable hw.tsc_cputimer_enable to 0.
sys/platform/pc64/isa/clock.c
sys/sys/systimer.h