]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc64, vdso: Add gettimeofday() and clock_gettime().
authorNick Alcock <nick.alcock@oracle.com>
Mon, 8 Dec 2014 13:42:37 +0000 (13:42 +0000)
committerAllen Pais <allen.pais@oracle.com>
Tue, 15 Sep 2015 12:09:05 +0000 (17:39 +0530)
commit23e9ecd9c87398613ade84d828643201958baab1
treed956fe6f4c5ae0addf9c6b78849dece2b192f745
parent63a29f1a2e6eca885d6f3fee359e67794d5b5ef3
sparc64, vdso: Add gettimeofday() and clock_gettime().

This commit adds gettimeofday() and clock_gettime() entry points to the SPARC64
vDSO: in conjunction with a suitably-modified glibc this provides a speedup to
gettimeofday(), time() and some clock_gettime() calls of on the order of
10--15x (the higher figure is for the coarse clock_gettime() clocks).

gettimeofday() and clock_gettime() use largely separate code paths: all
other approaches with less code duplication (e.g. doing all the work in
a struct timespec and only shifting it into a struct timeval before return)
turned out slower.

Tested on %stick-capable machines only: %tick codepaths untested.

Orabug: 20861959
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
(cherry picked from commit e8f9e5cfc9d297c7ebbc459b677ee0b8a3e45154)
arch/sparc/Kconfig
arch/sparc/include/asm/clocksource.h [new file with mode: 0644]
arch/sparc/include/asm/vvar.h
arch/sparc/kernel/Makefile
arch/sparc/kernel/time_64.c
arch/sparc/kernel/vsyscall_gtod.c [new file with mode: 0644]
arch/sparc/vdso/Makefile
arch/sparc/vdso/vclock_gettime.c [new file with mode: 0644]
arch/sparc/vdso/vdso.lds.S
include/linux/clocksource.h