aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/vdso
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@mit.edu>2012-03-23 00:15:52 -0400
committerJohn Stultz <john.stultz@linaro.org>2012-03-23 19:49:35 -0400
commit5f293474c4c6c4dc2baaf2dfd486748b5986de76 (patch)
tree1ced9f5c401aa7d808954a21e527a0f0e54ea9b8 /arch/x86/vdso
parent91ec87d57fc38c529034e853687dfb7756de5406 (diff)
x86-64: Inline vdso clock_gettime helpers
This is about a 3% speedup on Sandy Bridge. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'arch/x86/vdso')
-rw-r--r--arch/x86/vdso/vclock_gettime.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 6eea70b8f384..885eff49d6ab 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -94,7 +94,8 @@ notrace static inline long vgetns(void)
94 return (v * gtod->clock.mult) >> gtod->clock.shift; 94 return (v * gtod->clock.mult) >> gtod->clock.shift;
95} 95}
96 96
97notrace static noinline int do_realtime(struct timespec *ts) 97/* Code size doesn't matter (vdso is 4k anyway) and this is faster. */
98notrace static int __always_inline do_realtime(struct timespec *ts)
98{ 99{
99 unsigned long seq, ns; 100 unsigned long seq, ns;
100 int mode; 101 int mode;
@@ -111,7 +112,7 @@ notrace static noinline int do_realtime(struct timespec *ts)
111 return mode; 112 return mode;
112} 113}
113 114
114notrace static noinline int do_monotonic(struct timespec *ts) 115notrace static int do_monotonic(struct timespec *ts)
115{ 116{
116 unsigned long seq, ns; 117 unsigned long seq, ns;
117 int mode; 118 int mode;
@@ -128,7 +129,7 @@ notrace static noinline int do_monotonic(struct timespec *ts)
128 return mode; 129 return mode;
129} 130}
130 131
131notrace static noinline int do_realtime_coarse(struct timespec *ts) 132notrace static int do_realtime_coarse(struct timespec *ts)
132{ 133{
133 unsigned long seq; 134 unsigned long seq;
134 do { 135 do {
@@ -139,7 +140,7 @@ notrace static noinline int do_realtime_coarse(struct timespec *ts)
139 return 0; 140 return 0;
140} 141}
141 142
142notrace static noinline int do_monotonic_coarse(struct timespec *ts) 143notrace static int do_monotonic_coarse(struct timespec *ts)
143{ 144{
144 unsigned long seq; 145 unsigned long seq;
145 do { 146 do {