diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-06-28 16:22:18 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-07-23 12:17:45 +0200 |
commit | c73deb6aecda2955716f31572516f09d930ef450 (patch) | |
tree | 037f7945cb4289545d5ffbe9506e071a83d6c1a6 /arch/x86/include/asm/tsc.h | |
parent | 860f085b74e9f0075de8140ed3a1e5b5e3e39aa8 (diff) | |
download | linux-stable-c73deb6aecda2955716f31572516f09d930ef450.tar.gz linux-stable-c73deb6aecda2955716f31572516f09d930ef450.tar.bz2 linux-stable-c73deb6aecda2955716f31572516f09d930ef450.zip |
perf/x86: Add ability to calculate TSC from perf sample timestamps
For modern CPUs, perf clock is directly related to TSC. TSC
can be calculated from perf clock and vice versa using a simple
calculation. Two of the three componenets of that calculation
are already exported in struct perf_event_mmap_page. This patch
exports the third.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1372425741-1676-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/tsc.h')
-rw-r--r-- | arch/x86/include/asm/tsc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h index c91e8b9d588b..235be70d5bb4 100644 --- a/arch/x86/include/asm/tsc.h +++ b/arch/x86/include/asm/tsc.h @@ -49,6 +49,7 @@ extern void tsc_init(void); extern void mark_tsc_unstable(char *reason); extern int unsynchronized_tsc(void); extern int check_tsc_unstable(void); +extern int check_tsc_disabled(void); extern unsigned long native_calibrate_tsc(void); extern int tsc_clocksource_reliable; |