summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 21:04:57 +0000
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 15:01:47 -0700
commit48f18fd6addc199f330d838d54fe7b0a0892adaa (patch)
tree21f3f32df6a8ee014b6df7cd1b2653977df6f046 /kernel
parent250fade8af2ac5dda8d5106ea06738b6f9e768a7 (diff)
downloadlinux-48f18fd6addc199f330d838d54fe7b0a0892adaa.tar.gz
linux-48f18fd6addc199f330d838d54fe7b0a0892adaa.tar.bz2
linux-48f18fd6addc199f330d838d54fe7b0a0892adaa.zip
timekeeping: Use ktime_get_boottime() for get_monotonic_boottime()
get_monotonic_boottime() is not used in fast pathes, so the extra timespec conversion is not problematic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timekeeping.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index b35613508725..f63476fb0daf 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1536,40 +1536,6 @@ void getboottime(struct timespec *ts)
}
EXPORT_SYMBOL_GPL(getboottime);
-/**
- * get_monotonic_boottime - Returns monotonic time since boot
- * @ts: pointer to the timespec to be set
- *
- * Returns the monotonic time since boot in a timespec.
- *
- * This is similar to CLOCK_MONTONIC/ktime_get_ts, but also
- * includes the time spent in suspend.
- */
-void get_monotonic_boottime(struct timespec *ts)
-{
- struct timekeeper *tk = &tk_core.timekeeper;
- struct timespec64 tomono, sleep, ret;
- s64 nsec;
- unsigned int seq;
-
- WARN_ON(timekeeping_suspended);
-
- do {
- seq = read_seqcount_begin(&tk_core.seq);
- ret.tv_sec = tk->xtime_sec;
- nsec = timekeeping_get_ns(tk);
- tomono = tk->wall_to_monotonic;
- sleep = tk->total_sleep_time;
-
- } while (read_seqcount_retry(&tk_core.seq, seq));
-
- ret.tv_sec += tomono.tv_sec + sleep.tv_sec;
- ret.tv_nsec = 0;
- timespec64_add_ns(&ret, nsec + tomono.tv_nsec + sleep.tv_nsec);
- *ts = timespec64_to_timespec(ret);
-}
-EXPORT_SYMBOL_GPL(get_monotonic_boottime);
-
unsigned long get_seconds(void)
{
struct timekeeper *tk = &tk_core.timekeeper;