aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/tsc.h
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2008-04-26 19:39:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-29 07:45:24 -0400
commit9752082560b440e6a45624569d26802e20d1b8b4 (patch)
treedc5f0358a164dda9b375272e888b9f2138463e54 /include/asm-x86/tsc.h
parent4c0587e6e42c5b679234d3dffda8a888dc0ff9c1 (diff)
x86: vget_cycles() __always_inline
Mark vget_cycles() as __always_inline, so gcc is never tempted to make the vsyscall vread_tsc() dive into kernel text, with resulting SIGSEGV. This was a self-inflicted wound: I've not seen that happen with unhacked sources; but for debug reasons I'd changed my x86/Makefile to compile no-unit-at-a-time, and that in conjunction with OPTIMIZE_INLINING=y ended up with vget_cycles() in kernel text. Perhaps it can happen in other ways: safer to use __always_inline. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/tsc.h')
-rw-r--r--include/asm-x86/tsc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h
index d2d8eb5b55f5..548873ab5fc1 100644
--- a/include/asm-x86/tsc.h
+++ b/include/asm-x86/tsc.h
@@ -32,7 +32,7 @@ static inline cycles_t get_cycles(void)
32 return ret; 32 return ret;
33} 33}
34 34
35static inline cycles_t vget_cycles(void) 35static __always_inline cycles_t vget_cycles(void)
36{ 36{
37 /* 37 /*
38 * We only do VDSOs on TSC capable CPUs, so this shouldnt 38 * We only do VDSOs on TSC capable CPUs, so this shouldnt