glibc/sysdeps
Matthew Fortune b39d84adff VDSO support for MIPS
This patch adds support for using the implementations of gettimeofday()
and clock_gettime() provided by the kernel in the VDSO. The VDSO will
always provide clock_gettime() as CLOCK_{REALTIME,MONOTONIC}_COARSE can
be implemented regardless of platform. CLOCK_{REALTIME,MONOTONIC}, along
with gettimeofday(), are only implemented on platforms which make use of
either the CP0 count or GIC as their clocksource. On other platforms,
the VDSO does not provide the __vdso_gettimeofday symbol, as it is
never useful.

The VDSO functions return ENOSYS when they encounter an unsupported
request, in which case glibc should fall back to the standard syscall.

Tested with upstream kernel 4.5 and QEMU emulating Malta.

./vdsotest gettimeofday bench
gettimeofday: syscall: 1021 nsec/call
gettimeofday:    libc: 262 nsec/call
gettimeofday:    vdso: 174 nsec/call

	* sysdeps/unix/sysv/linux/mips/Makefile (sysdep_routines):
	Include dl-vdso.
	* sysdeps/unix/sysv/linux/mips/Versions: Add
	__vdso_clock_gettime.
	* sysdeps/unix/sysv/linux/mips/init-first.c: New file.
	* sysdeps/unix/sysv/linux/mips/libc-vdso.h: New file.
	* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h:
	(INTERNAL_VSYSCALL_CALL): Define to be compatible with MIPS
	definitions of INTERNAL_SYSCALL_{ERROR_P,ERRNO}.
	(HAVE_CLOCK_GETTIME_VSYSCALL): Define.
	(HAVE_GETTIMEOFDAY_VSYSCALL): Define.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
2016-04-12 11:05:13 +01:00
..
aarch64
alpha
arm Fix building glibc master with NDEBUG and --with-cpu. 2016-03-15 23:23:24 -04:00
generic Fix crash on getauxval call without HAVE_AUX_VECTOR 2016-04-10 23:58:43 +02:00
gnu
hppa
i386 When disabling SSE, make sure -fpmath is not set to use SSE either 2016-04-09 22:14:24 -04:00
ia64
ieee754 Increase internal precision of ldbl-128ibm decimal printf [BZ #19853] 2016-03-31 12:14:33 -05:00
init_array
m68k
mach hurd: Add c++-types expected result 2016-03-20 22:16:34 +01:00
microblaze
mips
nacl Fix build with HAVE_AUX_VECTOR 2016-04-11 10:27:25 +02:00
nios2
nptl
posix Fix flag test in waitid compatibility layer 2016-03-13 21:44:09 +01:00
powerpc powerpc: Add optimized P8 strspn 2016-04-07 15:51:28 -05:00
pthread
s390 S390: Use ahi instead of aghi in 32bit _dl_runtime_resolve. 2016-04-01 10:42:54 +02:00
sh
sparc
tile
unix VDSO support for MIPS 2016-04-12 11:05:13 +01:00
wordsize-32
wordsize-64
x86 Remove Fast_Copy_Backward from Intel Core processors 2016-04-01 15:09:14 -07:00
x86_64 configure: fix test == usage 2016-04-09 20:05:13 -04:00