freebsd-skq/sys/arm/include
kib e56264ca17 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 Disable alignment faults on armv6, adjust various alignment-related macros 2016-05-26 00:03:23 +00:00
_bus.h
_inttypes.h
_limits.h
_stdint.h ARM: Remove trailing whitespace from sys/arm/include 2015-11-10 12:02:41 +00:00
_types.h Undo r302601, WCHAR_MAX may not be a valid wchar value. 2016-07-12 04:20:44 +00:00
acle-compat.h
armreg.h Start to clean MIDR values using the CPUID scheme. We don't need to know 2016-06-07 18:50:36 +00:00
asm.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
asmacros.h
at91_gpio.h
atags.h ARM: Fix ATAG handling in LINUX_BOOT_API: 2016-03-26 06:57:36 +00:00
atomic-v4.h Implement atomic_cmpset_acq_64 and atomic_cmpset_rel_64 on arm and armeb. 2016-05-18 13:09:52 +00:00
atomic-v6.h ARM: Implement atomic_swap_int(9). It's used in DRM2 code. 2015-11-28 12:12:28 +00:00
atomic.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
blockio.h
board.h ARM: Remove trailing whitespace from sys/arm/include 2015-11-10 12:02:41 +00:00
bus_dma.h Eliminate the last dregs of the old global arm_root_dma_tag. 2015-11-02 22:49:39 +00:00
bus.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
clock.h
counter.h
cpu-v4.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
cpu-v6.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
cpu.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
cpuconf.h ARM: Remove support for xscale i80219 and i80321 CPUs. We haven't single 2016-02-03 09:15:44 +00:00
cpufunc.h ARM: Use new ARMv6 naming conventions for cache and TLB functions 2016-02-05 14:57:41 +00:00
cpuinfo.h Set the correct values in the arm aux control register, based on chip type. 2015-10-19 19:18:02 +00:00
db_machdep.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
debug_monitor.h Improve ARM debug_monitor for SMP machines 2016-05-29 17:35:38 +00:00
disassem.h ARM: Remove trailing whitespace from sys/arm/include 2015-11-10 12:02:41 +00:00
dump.h
elf.h Move/add ARM ELF PHDR types to elf_common.h 2016-08-02 20:26:04 +00:00
endian.h ARM: Remove trailing whitespace from sys/arm/include 2015-11-10 12:02:41 +00:00
exec.h
fdt.h Import ARM_INTRNG, the "next generation" interrupt architecture for arm 2015-10-18 18:26:19 +00:00
fiq.h
float.h
floatingpoint.h
fp.h
frame.h
gdb_machdep.h
ieee.h
ieeefp.h
in_cksum.h
intr.h Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine 2016-04-15 16:05:41 +00:00
kdb.h ARM: Use new ARMv6 naming conventions for cache and TLB functions 2016-02-05 14:57:41 +00:00
limits.h
machdep.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +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 Add mmu format info into ARM vmcore. 2016-01-15 18:53:06 +00:00
ofw_machdep.h Allow us to be told about memory past the first 4GB point, but ignore it. 2016-01-25 23:04:40 +00:00
param.h Revert the recent armv6 changes to ALIGNED_POINTER(), restoring the 2016-06-21 17:53:42 +00:00
pcb.h Make PCB structure binary compatible for old and new PMAP on ARM 2015-11-17 13:09:51 +00:00
pcpu.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
physmem.h Allow us to be told about memory past the first 4GB point, but ignore it. 2016-01-25 23:04:40 +00:00
pl310.h Make pl310_print_config static, it's not called out of pl310.c 2015-11-17 11:26:35 +00:00
platform.h
platformvar.h Add a MULTIDELAY option to allow the ARM kernel to have multiple DELAY 2016-04-30 17:27:33 +00:00
pmap_var.h Don't use atomic operations for page table entries and handle access 2016-04-22 06:32:27 +00:00
pmap-v4.h Rename pte.h to pte-v4.h and start including directly either pte-v4.h 2016-02-19 09:23:32 +00:00
pmap-v6.h Remove not used definitions and fix some style nits. 2016-02-19 10:32:17 +00:00
pmap.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
pmc_mdep.h
proc.h Remove the ARMv4/ARMv5 userland atomic support from struct proc on armv6. 2016-06-08 22:29:30 +00:00
profile.h
psl.h
pte-v4.h Rename pte.h to pte-v4.h and start including directly either pte-v4.h 2016-02-19 09:23:32 +00:00
pte-v6.h Remove AP_KRW definition not needed after r295801. 2016-02-19 09:52:11 +00:00
ptrace.h
reg.h SMP support for ARMv6/v7 HW watchpoints 2016-01-28 12:43:58 +00:00
reloc.h
resource.h ARM: Define PCI_RES_BUS resource for platforms having NEW_PCIB enabled. 2015-12-02 14:24:14 +00:00
runq.h
sc_machdep.h
setjmp.h
sf_buf.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
sigframe.h
signal.h
smp.h Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine 2016-04-15 16:05:41 +00:00
stack.h
stdarg.h
swi.h
sysarch.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
sysreg.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
trap.h Move the check to see if we are tracing a function with the DTrace Function 2015-12-05 09:32:36 +00:00
ucontext.h
undefined.h
utrap.h
vdso.h Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
vfp.h Treat synchronous VFP exception just like aynchronous: as an FP exception, 2015-11-01 21:59:56 +00:00
vm.h Include machine/acle-compat.h in cdefs.h on arm if the compiler doesn't 2016-05-25 19:44:26 +00:00
vmparam.h Move arm's devmap to some generic place, so it can be used 2016-04-26 11:53:37 +00:00