freebsd-dev/sys/arm64/include
Konstantin Belousov 1680854946 Implement userspace gettimeofday(2) with HPET timecounter.
Right now, userspace (fast) gettimeofday(2) on x86 only works for
RDTSC.  For older machines, like Core2, where RDTSC is not C2/C3
invariant, and which fall to HPET hardware, this means that the call
has both the penalty of the syscall and of the uncached hw behind the
QPI or PCIe connection to the sought bridge.  Nothing can me done
against the access latency, but the syscall overhead can be removed.
System already provides mappable /dev/hpetX devices, which gives
straight access to the HPET registers page.

Add yet another algorithm to the x86 'vdso' timehands. Libc is updated
to handle both RDTSC and HPET.  For HPET, the index of the hpet device
to mmap is passed from kernel to userspace, index might be changed and
libc invalidates its mapping as needed.

Remove cpu_fill_vdso_timehands() KPI, instead require that
timecounters which can be used from userspace, to provide
tc_fill_vdso_timehands{,32}() methods.  Merge i386 and amd64
libc/<arch>/sys/__vdso_gettc.c into one source file in the new
libc/x86/sys location.  __vdso_gettc() internal interface is changed
to move timecounter algorithm detection into the MD code.

Measurements show that RDTSC even with the syscall overhead is faster
than userspace HPET access.  But still, userspace HPET is three-four
times faster than syscall HPET on several Core2 and SandyBridge
machines.

Tested by:	Howard Su <howard0su@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D7473
2016-08-17 09:52:09 +00:00
..
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h
armreg.h Add the ARMv8.1 identification registers to the list we print when booting. 2016-08-15 09:23:08 +00:00
asm.h
atomic.h
bus_dma_impl.h
bus_dma.h
bus.h
clock.h
counter.h
cpu.h
cpufunc.h
db_machdep.h
debug_monitor.h
disassem.h
dump.h
elf.h
endian.h
exec.h
float.h
floatingpoint.h
frame.h
hypervisor.h
ieeefp.h
in_cksum.h
intr.h
iodev.h
kdb.h
machdep.h Add a kernel variable to let the user to select their preferred order 2016-08-01 12:17:44 +00:00
md_var.h Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
memdev.h
metadata.h
minidump.h
ofw_machdep.h
param.h
pcb.h
pci_cfgreg.h
pcpu.h
pmap.h Implement promotions and demotions in the arm64 pmap code. For now we don't 2016-08-12 10:29:34 +00:00
pmc_mdep.h
proc.h
profile.h
psl.h
pte.h
ptrace.h
reg.h
reloc.h
resource.h
runq.h
setjmp.h
sf_buf.h
signal.h
smp.h
stack.h
stdarg.h
sysarch.h
trap.h
ucontext.h
vdso.h Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
vfp.h
vm.h
vmparam.h