aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2016-01-23 23:48:55 +0000
committerHauke Mehrtens <hauke@openwrt.org>2016-01-23 23:48:55 +0000
commit5ff1d45a7fc6ca9090275ed9f65ea258e187af30 (patch)
tree868eaeef0d2c5bdb327221f3c91b6a398604df68 /toolchain
parent8fab4d68715798c91a001a2a2549d6a17f0afaef (diff)
downloadmaster-187ad058-5ff1d45a7fc6ca9090275ed9f65ea258e187af30.tar.gz
master-187ad058-5ff1d45a7fc6ca9090275ed9f65ea258e187af30.tar.bz2
master-187ad058-5ff1d45a7fc6ca9090275ed9f65ea258e187af30.zip
musl: mips: add vdso support
vdso support is available on mips starting with kernel 4.4, see kernel commit a7f4df4e21 "MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()" for details. These are my micro benchmark results for 1.000.000 calls to clock_gettime(CLOCK_MONOTONIC, &tp) without vdso: root@OpenWrt:/# time ./vdso-test real 0m 0.95s user 0m 0.24s sys 0m 0.70s with vdso: root@OpenWrt:/# time /usr/bin/vdso-test real 0m 0.35s user 0m 0.34s sys 0m 0.00s Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48466 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/musl/patches/030-mips-add-vdso-support.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/toolchain/musl/patches/030-mips-add-vdso-support.patch b/toolchain/musl/patches/030-mips-add-vdso-support.patch
new file mode 100644
index 0000000000..e4a15e323b
--- /dev/null
+++ b/toolchain/musl/patches/030-mips-add-vdso-support.patch
@@ -0,0 +1,29 @@
+From c29a29c3334344e0f3cfdec6130a6261514507a0 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 23 Jan 2016 16:23:09 +0100
+Subject: [PATCH 2/2] mips: add vdso support
+
+vdso support is available on mips starting with kernel 4.4, see kernel
+commit a7f4df4e21 "MIPS: VDSO: Add implementations of gettimeofday()
+and clock_gettime()" for details.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ arch/mips/syscall_arch.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h
+index e74e0ad..39c0ea3 100644
+--- a/arch/mips/syscall_arch.h
++++ b/arch/mips/syscall_arch.h
+@@ -161,3 +161,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
+ if (n == SYS_fstatat) __stat_fix(c);
+ return r2;
+ }
++
++#define VDSO_USEFUL
++#define VDSO_CGT_SYM "__vdso_clock_gettime"
++#define VDSO_CGT_VER "LINUX_2.6"
+--
+2.7.0.rc3
+