timekeeping: Use ktime_t based data for ktime_get_real()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 16 Jul 2014 21:04:14 +0000 (21:04 +0000)
committerJohn Stultz <john.stultz@linaro.org>
Wed, 23 Jul 2014 17:17:59 +0000 (10:17 -0700)
Speed up the readout.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/linux/timekeeping.h
kernel/time/timekeeping.c

index a58e4b1879db5e60f97dcd07e8bacbaf304cf965..68e6678a743bc485f5c85d256d6892d009c6a540 100644 (file)
@@ -108,11 +108,18 @@ enum tk_offsets {
 
 extern ktime_t ktime_get(void);
 extern ktime_t ktime_get_with_offset(enum tk_offsets offs);
-extern ktime_t ktime_get_real(void);
 extern ktime_t ktime_get_boottime(void);
 extern ktime_t ktime_get_monotonic_offset(void);
 extern ktime_t ktime_get_clocktai(void);
 
+/**
+ * ktime_get_real - get the real (wall-) time in ktime_t format
+ */
+static inline ktime_t ktime_get_real(void)
+{
+       return ktime_get_with_offset(TK_OFFS_REAL);
+}
+
 /*
  * RTC specific
  */
index 7c5f5e4a006ce87e5f4bf957651bbd6f010eab71..56db2e16970a90f41c661a309f5f11a99dd2710a 100644 (file)
@@ -773,21 +773,6 @@ int timekeeping_notify(struct clocksource *clock)
        return tk->clock == clock ? 0 : -1;
 }
 
-/**
- * ktime_get_real - get the real (wall-) time in ktime_t format
- *
- * returns the time in ktime_t format
- */
-ktime_t ktime_get_real(void)
-{
-       struct timespec64 now;
-
-       getnstimeofday64(&now);
-
-       return timespec64_to_ktime(now);
-}
-EXPORT_SYMBOL_GPL(ktime_get_real);
-
 /**
  * getrawmonotonic - Returns the raw monotonic time in a timespec
  * @ts:                pointer to the timespec to be set
This page took 0.029028 seconds and 5 git commands to generate.