summaryrefslogtreecommitdiff
path: root/include/linux/timekeeping32.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-04-27 15:40:14 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-05-19 13:57:32 +0200
commitfb7fcc96a86cfaef0f6dcc0665516aa68611e736 (patch)
tree1e09a71e1dde31f7cfab5080dba19dec0dadb049 /include/linux/timekeeping32.h
parentedca71fecb77e2697337d192cbfe96f513407761 (diff)
downloadlinux-fb7fcc96a86cfaef0f6dcc0665516aa68611e736.tar.gz
timekeeping: Standardize on ktime_get_*() naming
The current_kernel_time64, get_monotonic_coarse64, getrawmonotonic64, get_monotonic_boottime64 and timekeeping_clocktai64 interfaces have rather inconsistent naming, and they differ in the calling conventions by passing the output either by reference or as a return value. Rename them to ktime_get_coarse_real_ts64, ktime_get_coarse_ts64, ktime_get_raw_ts64, ktime_get_boottime_ts64 and ktime_get_clocktai_ts64 respectively, and provide the interfaces with macros or inline functions as needed. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Stephen Boyd <sboyd@kernel.org> Cc: y2038@lists.linaro.org Cc: John Stultz <john.stultz@linaro.org> Link: https://lkml.kernel.org/r/20180427134016.2525989-4-arnd@arndb.de
Diffstat (limited to 'include/linux/timekeeping32.h')
-rw-r--r--include/linux/timekeeping32.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/timekeeping32.h b/include/linux/timekeeping32.h
index 5abff52d07fd..8762c2f45f8b 100644
--- a/include/linux/timekeeping32.h
+++ b/include/linux/timekeeping32.h
@@ -11,9 +11,11 @@ unsigned long get_seconds(void);
static inline struct timespec current_kernel_time(void)
{
- struct timespec64 now = current_kernel_time64();
+ struct timespec64 ts64;
+
+ ktime_get_coarse_real_ts64(&ts64);
- return timespec64_to_timespec(now);
+ return timespec64_to_timespec(ts64);
}
/**
@@ -55,13 +57,17 @@ static inline void getrawmonotonic(struct timespec *ts)
{
struct timespec64 ts64;
- getrawmonotonic64(&ts64);
+ ktime_get_raw_ts64(&ts64);
*ts = timespec64_to_timespec(ts64);
}
static inline struct timespec get_monotonic_coarse(void)
{
- return timespec64_to_timespec(get_monotonic_coarse64());
+ struct timespec64 ts64;
+
+ ktime_get_coarse_ts64(&ts64);
+
+ return timespec64_to_timespec(ts64);
}
static inline void getboottime(struct timespec *ts)