diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-09-11 10:28:31 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-11 10:29:42 +0200 |
commit | 05e7ff7da78bad3edc1290ed86b4a37da72ced62 (patch) | |
tree | f7348a9f4f561a53465abea731c2ef59900fd62f /arch/s390/kernel | |
parent | ca99dab01dd63dcc413395bd3e75b0be152dfefc (diff) | |
download | kernel_samsung_tuna-05e7ff7da78bad3edc1290ed86b4a37da72ced62.zip kernel_samsung_tuna-05e7ff7da78bad3edc1290ed86b4a37da72ced62.tar.gz kernel_samsung_tuna-05e7ff7da78bad3edc1290ed86b4a37da72ced62.tar.bz2 |
[S390] introduce get_clock_monotonic
Introduce get_clock_monotonic() function which can be used to get a
(fast) timestamp. Resolution is the same as for get_clock(). The
only difference is that the timestamps are monotonic and don't jump
backward or forward.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/time.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index d4c8e9c..54e327e 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -60,6 +60,7 @@ #define TICK_SIZE tick u64 sched_clock_base_cc = -1; /* Force to data section. */ +EXPORT_SYMBOL_GPL(sched_clock_base_cc); static DEFINE_PER_CPU(struct clock_event_device, comparators); @@ -68,7 +69,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators); */ unsigned long long notrace sched_clock(void) { - return ((get_clock_xt() - sched_clock_base_cc) * 125) >> 9; + return (get_clock_monotonic() * 125) >> 9; } /* |