freebsd-skq/sys/arm64/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
_bus.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h Undo r302601, WCHAR_MAX may not be a valid wchar value. 2016-07-12 04:20:44 +00:00
acpica_machdep.h Add basic support for ACPI. It splits out the nexus driver to two new 2015-06-11 15:45:33 +00:00
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 Mark functions as such. This means we call them directly rather than have 2015-10-27 22:24:57 +00:00
atomic.h Rework the atomic code to reduce the repetition. This merges some of the 2015-12-01 12:27:36 +00:00
bus_dma_impl.h Port x86 busdma to ARM64 2015-05-08 18:47:19 +00:00
bus_dma.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
bus.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
clock.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
counter.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
cpu.h Use the yield instruction in the arm64 cpu_spinwait. This instruction is 2016-04-25 17:32:08 +00:00
cpufunc.h Add support to the arm64 busdma to handle the cache. For now this is 2016-05-13 16:03:50 +00:00
db_machdep.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
debug_monitor.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
disassem.h Framework for ARM64 instruction disassembler 2016-01-29 13:06:30 +00:00
dump.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
elf.h
endian.h
exec.h
float.h Rationalize BSD license on sys/*/include/float.h 2015-08-05 17:05:35 +00:00
floatingpoint.h add floatingpoint.h for arm64 2015-06-24 14:51:53 +00:00
frame.h Implement dtrace_getupcstack in ARM64 2016-04-06 05:13:36 +00:00
hypervisor.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
ieeefp.h Fix the floating-point exception values to line up with the hardware 2015-06-24 12:19:49 +00:00
in_cksum.h Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
intr.h Finish removing the non-INTRNG support from sys/arm64. 2016-07-14 17:31:29 +00:00
iodev.h Add basic support for ACPI. It splits out the nexus driver to two new 2015-06-11 15:45:33 +00:00
kdb.h Implement kdb_cpu_sync_icache on arm64. 2016-02-05 15:38:28 +00:00
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 Add memmmap on arm64 so we can mmap /dev/mem and /dev/kmem. 2016-07-13 23:03:34 +00:00
metadata.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
minidump.h Add the arm64 minidump header. This was missed from r286953. 2015-08-20 11:26:26 +00:00
ofw_machdep.h Make using the #address-cells property on the interrupt parent in device 2016-01-02 19:28:35 +00:00
param.h Force re-routing PCI interrupts (this is for legacy INTx not MSI). 2016-03-02 15:20:42 +00:00
pcb.h Add support for 4 level pagetables. The userland address space has been 2016-03-31 11:07:24 +00:00
pci_cfgreg.h Implement stubs for ACPI PCI routines 2015-07-12 17:28:31 +00:00
pcpu.h Rework CPU identification on ARM64 2015-07-09 11:32:29 +00:00
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 Add Performance Monitoring Counters support for AArch64. 2015-05-19 15:25:47 +00:00
proc.h
profile.h
psl.h Add support for arm64 to loader.efi and boot1.efi 2015-04-14 13:55:01 +00:00
pte.h Fix I/O coherence issues on ThunderX when SMP is disabled 2016-05-11 13:23:56 +00:00
ptrace.h Add more arm64 machine dependent headers. With this we now have the minimum 2015-03-26 21:10:42 +00:00
reg.h Add more arm64 machine dependent headers. With this we now have the minimum 2015-03-26 21:10:42 +00:00
reloc.h
resource.h Define PCI_RES_BUS for NEW_PCIB 2016-05-19 14:00:18 +00:00
runq.h
setjmp.h Increase the size and alignment of the setjmp buffer. This will allow for 2015-12-23 15:22:44 +00:00
sf_buf.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
signal.h
smp.h Rename COUNT_IPI to INTR_IPI_COUNT to reduce the diff with intrng. 2016-03-18 16:29:58 +00:00
stack.h Split out db_unwind_frame() so it can be used by DTrace. 2015-06-11 12:47:13 +00:00
stdarg.h
sysarch.h Add more arm64 machine dependent headers. With this we now have the minimum 2015-03-26 21:10:42 +00:00
trap.h Bring in the start of the arm64 kernel. 2015-04-13 14:43:10 +00:00
ucontext.h Clean up the types used in <machine/ucontext.h> on arm64. As some ports 2015-07-09 12:51:50 +00:00
vdso.h Implement userspace gettimeofday(2) with HPET timecounter. 2016-08-17 09:52:09 +00:00
vfp.h Pass the pcb to store the vfp state in to vfp_save_state. This fixes a bug 2015-08-03 11:05:02 +00:00
vm.h
vmparam.h ARM64: fix DMAP calculation 2016-06-30 04:58:19 +00:00