cputimer/tsc: Prevent rdtsc reordering
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 1 Jun 2015 14:19:07 +0000 (22:19 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 4 Jun 2015 03:23:04 +0000 (11:23 +0800)
commit59878316de1fa796e54feb16f91bf83b87629bea
treed86c2b777b856f0dba8b12c929fabb5d52b89264
parentea9728cac4b72010117b60e0ef32827a631c5046
cputimer/tsc: Prevent rdtsc reordering

Use lfence on Intel and mfence on AMD to make sure that all instructions
before rdtsc are completed.  This should prevent time warps, if TSC is
selected as cputimer.
sys/platform/pc64/isa/clock.c