Revert rdtsc out of line change Reverts commit 6aea5bc37fa790eaf3a942f0785985914568e214 Author: Ingo Molnar Date: Sat Jan 5 13:27:08 2008 +0100 x86: move native_read_tsc() offline move native_read_tsc() offline. The function is called by vsyscalls in ring 3, so it can't be out of line this way. Signed-off-by: Andi Kleen Index: linux/arch/x86/kernel/rtc.c =================================================================== --- linux.orig/arch/x86/kernel/rtc.c +++ linux/arch/x86/kernel/rtc.c @@ -194,14 +194,3 @@ int update_persistent_clock(struct times { return set_rtc_mmss(now.tv_sec); } - -unsigned long long native_read_tsc(void) -{ - DECLARE_ARGS(val, low, high); - - asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); - rdtsc_barrier(); - - return EAX_EDX_VAL(val, low, high); -} - Index: linux/include/asm-x86/msr.h =================================================================== --- linux.orig/include/asm-x86/msr.h +++ linux/include/asm-x86/msr.h @@ -91,7 +91,13 @@ static inline int native_write_msr_safe( return err; } -extern unsigned long long native_read_tsc(void); +static inline unsigned long long native_read_tsc(void) +{ + DECLARE_ARGS(val, low, high); + + asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); + return EAX_EDX_VAL(val, low, high); +} static inline unsigned long long native_read_pmc(int counter) {