freebsd-skq/lib/libc/arm
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
..
aeabi Make armv6 hard float abi by default. Kill armv6hf. 2016-05-18 06:01:18 +00:00
gen Make armv6 hard float abi by default. Kill armv6hf. 2016-05-18 06:01:18 +00:00
softfloat On ARM EABI double precision floating point values are stored in the 2013-09-07 14:04:10 +00:00
string Annotate arm userspace assembler sources stating their tolerance to 2015-09-29 16:09:58 +00:00
sys Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
_fpmath.h On ARM EABI double precision floating point values are stored in the 2013-09-07 14:04:10 +00:00
arith.h On ARM EABI double precision floating point values are stored in the 2013-09-07 14:04:10 +00:00
gd_qnan.h
Makefile.inc Make armv6 hard float abi by default. Kill armv6hf. 2016-05-18 06:01:18 +00:00
Symbol_vfp.map Add the fp{get,set}{mask,round} functions to the public symbols in the map. 2014-09-05 18:11:36 +00:00
Symbol.map libc: stop exporting cerror 2016-03-30 14:42:09 +00:00
SYS.h Remove __ARM_EABI__ from more places in libc as this is the only ARM ABI 2015-05-31 12:53:10 +00:00