freebsd-dev/sys/amd64
Konstantin Belousov aea810386d Implement mechanism to export some kernel timekeeping data to
usermode, using shared page.  The structures and functions have vdso
prefix, to indicate the intended location of the code in some future.

The versioned per-algorithm data is exported in the format of struct
vdso_timehands, which mostly repeats the content of in-kernel struct
timehands. Usermode reading of the structure can be lockless.
Compatibility export for 32bit processes on 64bit host is also
provided. Kernel also provides usermode with indication about
currently used timecounter, so that libc can fall back to syscall if
configured timecounter is unknown to usermode code.

The shared data updates are initiated both from the tc_windup(), where
a fast task is queued to do the update, and from sysctl handlers which
change timecounter. A manual override switch
kern.timecounter.fast_gettime allows to turn off the mechanism.

Only x86 architectures export the real algorithm data, and there, only
for tsc timecounter. HPET counters page could be exported as well, but
I prefer to not further glue the kernel and libc ABI there until
proper vdso-based solution is developed.

Minimal stubs neccessary for non-x86 architectures to still compile
are provided.

Discussed with:	bde
Reviewed by:	jhb
Tested by:	flo
MFC after:	1 month
2012-06-22 07:06:40 +00:00
..
acpica - Remove unused code for CR3 and CR4. 2012-06-13 22:53:56 +00:00
amd64 Introduce CHANGE_PV_LIST_LOCK_TO_{PHYS,VM_PAGE}() to avoid duplication of 2012-06-22 05:01:36 +00:00
compile
conf - Updated TOE support in the kernel. 2012-06-19 07:34:13 +00:00
ia32 Eliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h. 2012-03-18 19:12:11 +00:00
include Implement mechanism to export some kernel timekeeping data to 2012-06-22 07:06:40 +00:00
linux32 Regenerate system call tables. 2012-05-25 21:52:57 +00:00
pci Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to 2011-06-22 21:04:13 +00:00
Makefile Adjustments to make a tags file a bit more suitable to amd64. 2008-12-01 14:15:10 +00:00