Skip to content

Commit

Permalink
x86: convert rdtscll() to use __native_read_tsc
Browse files Browse the repository at this point in the history
Impact: micro-optimization

Is there any reason why x86 rdtscll have to use the out of line
function instead of inline __native_read_tsc()?  native_read_tsc and
__native_read_tsc is essentially the same functions.

Patch to let x86 rdtscll() to use the inline version of read_tsc.

Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ken Chen authored and Ingo Molnar committed Dec 16, 2008
1 parent 5279585 commit 205516c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/include/asm/msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ static inline int rdmsrl_amd_safe(unsigned msr, unsigned long long *p)
}

#define rdtscl(low) \
((low) = (u32)native_read_tsc())
((low) = (u32)__native_read_tsc())

#define rdtscll(val) \
((val) = native_read_tsc())
((val) = __native_read_tsc())

#define rdpmc(counter, low, high) \
do { \
Expand Down

0 comments on commit 205516c

Please sign in to comment.