tsc: Factor out rdtsc_ordered()
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 1 Jun 2015 13:41:44 +0000 (21:41 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 4 Jun 2015 03:23:04 +0000 (11:23 +0800)
commitea9728cac4b72010117b60e0ef32827a631c5046
tree5ed0619d071172900cbe43c4967a4c0013bd3649
parent68e12e711e2c85111e9c803aca10615423ed6a0c
tsc: Factor out rdtsc_ordered()

Use lfence on Intel and mfence on AMD to make sure that all instructions
before rdtsc are completed.

While I'm here
- Remove redundant functions declaration in lwkt_thread.c to unbreak
  compile.
- Add cpu_vendor_id for vkernel64; extra work is needed to set it to a
  proper value.
sys/cpu/i386/include/cpufunc.h
sys/cpu/x86_64/include/cpufunc.h
sys/kern/lwkt_thread.c
sys/platform/pc64/isa/clock.c
sys/platform/vkernel64/include/md_var.h
sys/platform/vkernel64/x86_64/vm_machdep.c