[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <11859243121617-git-send-email-clameter@sgi.com>
Date: Tue, 31 Jul 2007 16:25:07 -0700
From: Christoph Lameter <clameter@....com>
To: linux-kernel@...r.kernel.org
Cc: Christoph Lameter <clameter@....com>
Subject: [PATCH 2/7] Simple Performance Counters: x86_64 support
Export cycles_to_ns (after renaming the cycles_2_ns to cycles_to_ns to be
conforming to other arches).
Signed-off-by: Christoph Lameter <clameter@....com>
---
arch/x86_64/kernel/tsc.c | 4 ++--
include/asm-x86_64/timex.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86_64/kernel/tsc.c b/arch/x86_64/kernel/tsc.c
index 2a59bde..59f69af 100644
--- a/arch/x86_64/kernel/tsc.c
+++ b/arch/x86_64/kernel/tsc.c
@@ -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;
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h
index 6ed21f4..d5e126c 100644
--- a/include/asm-x86_64/timex.h
+++ b/include/asm-x86_64/timex.h
@@ -28,4 +28,5 @@ extern int read_current_timer(unsigned long *timer_value);
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
--
1.5.2.4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists