diff options
author | John Stultz <john.stultz@linaro.org> | 2013-03-22 11:31:29 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-04-04 13:18:14 -0700 |
commit | aa6f9c595d857328e5d815e5b94c0e7cd31a6b59 (patch) | |
tree | bee031555304488a68e9f4dc76944b8924f11e7b /kernel/time/timekeeping.c | |
parent | ad460967a2953496ad76b1c22091ea99f21b4e86 (diff) |
ntp: Move do_adjtimex() and hardpps() functions to timekeeping.c
In preparation for changing the ntp locking rules, move
do_adjtimex and hardpps accessor functions to timekeeping.c,
but keep the code logic in ntp.c.
This patch also introduces a ntp_internal.h file so timekeeping
specific interfaces of ntp.c can be more limitedly shared with
timekeeping.c.
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index c5feb7aa3acb..a138ec2cde3e 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -24,6 +24,7 @@ #include <linux/pvclock_gtod.h> #include "tick-internal.h" +#include "ntp_internal.h" static struct timekeeper timekeeper; static DEFINE_RAW_SPINLOCK(timekeeper_lock); @@ -1613,6 +1614,26 @@ ktime_t ktime_get_monotonic_offset(void) EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset); /** + * do_adjtimex() - Accessor function to NTP __do_adjtimex function + */ +int do_adjtimex(struct timex *txc) +{ + return __do_adjtimex(txc); +} + + +#ifdef CONFIG_NTP_PPS +/** + * hardpps() - Accessor function to NTP __hardpps function + */ +void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts) +{ + __hardpps(phase_ts, raw_ts); +} +EXPORT_SYMBOL(hardpps); +#endif + +/** * xtime_update() - advances the timekeeping infrastructure * @ticks: number of ticks, that have elapsed since the last call. * |