]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: vget_cycles() __always_inline
authorHugh Dickins <hugh@veritas.com>
Sat, 26 Apr 2008 23:39:36 +0000 (00:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 29 Apr 2008 11:45:24 +0000 (13:45 +0200)
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>
include/asm-x86/tsc.h

index d2d8eb5b55f532365f9277b5f776109626f7ed4b..548873ab5fc1b0deabafc4b3dcbb23ee8cbf05db 100644 (file)
@@ -32,7 +32,7 @@ static inline cycles_t get_cycles(void)
        return ret;
 }
 
-static inline cycles_t vget_cycles(void)
+static __always_inline cycles_t vget_cycles(void)
 {
        /*
         * We only do VDSOs on TSC capable CPUs, so this shouldnt