diff options
author | John Stultz <john.stultz@linaro.org> | 2013-03-22 14:31:29 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2013-04-04 16:18:14 -0400 |
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 @@ | |||
24 | #include <linux/pvclock_gtod.h> | 24 | #include <linux/pvclock_gtod.h> |
25 | 25 | ||
26 | #include "tick-internal.h" | 26 | #include "tick-internal.h" |
27 | #include "ntp_internal.h" | ||
27 | 28 | ||
28 | static struct timekeeper timekeeper; | 29 | static struct timekeeper timekeeper; |
29 | static DEFINE_RAW_SPINLOCK(timekeeper_lock); | 30 | static DEFINE_RAW_SPINLOCK(timekeeper_lock); |
@@ -1613,6 +1614,26 @@ ktime_t ktime_get_monotonic_offset(void) | |||
1613 | EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset); | 1614 | EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset); |
1614 | 1615 | ||
1615 | /** | 1616 | /** |
1617 | * do_adjtimex() - Accessor function to NTP __do_adjtimex function | ||
1618 | */ | ||
1619 | int do_adjtimex(struct timex *txc) | ||
1620 | { | ||
1621 | return __do_adjtimex(txc); | ||
1622 | } | ||
1623 | |||
1624 | |||
1625 | #ifdef CONFIG_NTP_PPS | ||
1626 | /** | ||
1627 | * hardpps() - Accessor function to NTP __hardpps function | ||
1628 | */ | ||
1629 | void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts) | ||
1630 | { | ||
1631 | __hardpps(phase_ts, raw_ts); | ||
1632 | } | ||
1633 | EXPORT_SYMBOL(hardpps); | ||
1634 | #endif | ||
1635 | |||
1636 | /** | ||
1616 | * xtime_update() - advances the timekeeping infrastructure | 1637 | * xtime_update() - advances the timekeeping infrastructure |
1617 | * @ticks: number of ticks, that have elapsed since the last call. | 1638 | * @ticks: number of ticks, that have elapsed since the last call. |
1618 | * | 1639 | * |