plan9fox/sys
cinap_lenrek 347ac6ef58 guesscpuhz(), apm suspend
use fastclock timer (pit2) to measure cpufreq in guesscpuhz(). this
gives a bigger period minimizing the danger of overrun as pit2 runs
at the constant maximum period of 0x10000 ticks. also use smaller
loop increments (1000) and bigger maximum loop upper bound.

move the loops < ... check to the bottom of the loop so we get the
effective count *before* adding the next loop increment.

ilock() while doing measurements in guesscpuhz() to prevent accidents
with other processors reading fastclock or doing guesscpuhz()
in parralel.

export new i8253reset() function for apm to reset the timers after
a apm bios suspend.
2012-09-30 19:41:34 +02:00
..
doc /sys/doc: remove autogenerated postscript files 2012-06-06 22:28:48 +02:00
games/lib fortunes, rob, rsc: updates 2012-09-26 18:52:49 -05:00
include Add alignment hints for e512 ATA drives. 2012-09-09 17:22:12 +12:00
lib user: Marko Kostić <marko.m.kostic@gmail.com> 2012-09-19 23:37:47 +02:00
man cpuid(8): fix spelling 2012-09-28 21:49:12 -05:00
src guesscpuhz(), apm suspend 2012-09-30 19:41:34 +02:00