FROMLIST: lib: vdso: add support for time
authorMark Salyzyn <salyzyn@google.com>
Fri, 27 Oct 2017 15:58:18 +0000 (08:58 -0700)
committerMichael Benedict <michaelbt@live.com>
Sun, 22 Sep 2019 15:51:32 +0000 (01:51 +1000)
commitf5f95150760aa698c87b73e42e1a6d9947c2efab
tree4782784c2a050b2cdd081169822445a71f293473
parentb37091f4568ff13e93476f6fe77b3e9332946d89
FROMLIST: lib: vdso: add support for time

(cherry pick from url https://patchwork.kernel.org/patch/10053549/)

Add time() vdso support to match up with existing support in the x86's
vdso.  Currently benefitting arm and arm64 which uses the common
vgettimeofday.c implementation.  On arm provides about a ~14 fold
improvement in speed over the straight syscall, and about a ~5 fold
improvement in speed over an alternate library implementation that
relies on the vdso call to gettimeofday to fulfill the request.

We can provide __vdso_time even if we can not provide a speed
enhanced __vdso_gettimeofday.

Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Bug: 63737556
Bug: 20045882
Change-Id: I0bb3c6bafe57f9ed69350e2dd54edaae58316e8f
arch/arm/kernel/vdso.c
arch/arm/vdso/vdso.lds.S
arch/arm64/kernel/vdso/compiler.h [new file with mode: 0644]
arch/arm64/kernel/vdso/vdso.lds.S
lib/vdso/vgettimeofday.c