Simple Performance Counters: x86_64 support Export cycles_to_ns (after renaming the cycles_2_ns to cycles_to_ns toibe conformant with other arches). Signed-off-by: Christoph Lameter --- arch/x86_64/kernel/tsc.c | 4 ++-- include/asm-x86_64/timex.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6.23-rc1/arch/x86_64/kernel/tsc.c =================================================================== --- linux-2.6.23-rc1.orig/arch/x86_64/kernel/tsc.c 2007-07-22 13:41:00.000000000 -0700 +++ linux-2.6.23-rc1/arch/x86_64/kernel/tsc.c 2007-07-26 20:44:18.000000000 -0700 @@ -23,7 +23,7 @@ void set_cyc2ns_scale(unsigned long khz) cyc2ns_scale = (NSEC_PER_MSEC << NS_SCALE) / khz; } -static unsigned long long cycles_2_ns(unsigned long long cyc) +unsigned long long cycles_to_ns(unsigned long long cyc) { return (cyc * cyc2ns_scale) >> NS_SCALE; } @@ -39,7 +39,7 @@ unsigned long long sched_clock(void) */ rdtscll(a); - return cycles_2_ns(a); + return cycles_to_ns(a); } static int tsc_unstable; Index: linux-2.6.23-rc1/include/asm-x86_64/timex.h =================================================================== --- linux-2.6.23-rc1.orig/include/asm-x86_64/timex.h 2007-07-22 13:41:00.000000000 -0700 +++ linux-2.6.23-rc1/include/asm-x86_64/timex.h 2007-07-26 20:44:18.000000000 -0700 @@ -28,4 +28,5 @@ extern int read_current_timer(unsigned l extern void mark_tsc_unstable(char *msg); extern void set_cyc2ns_scale(unsigned long khz); +unsigned long long cycles_to_ns(unsigned long long cyc); #endif