diff options
author | John Stultz <john.stultz@linaro.org> | 2013-04-10 21:41:49 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-11 10:19:44 +0200 |
commit | 4e8f8b34b92b6514cc070aeb94d317cadd5071d7 (patch) | |
tree | ecbef4b23bff0198081a605b88b39aee205d1923 /kernel/time | |
parent | hrtimer: Fix ktime_add_ns() overflow on 32bit architectures (diff) | |
download | linux-4e8f8b34b92b6514cc070aeb94d317cadd5071d7.tar.xz linux-4e8f8b34b92b6514cc070aeb94d317cadd5071d7.zip |
timekeeping: Make sure to notify hrtimers when TAI offset changes
Now that we have CLOCK_TAI timers, make sure we notify hrtimer
code when TAI offset is changed.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/1365622909-953-1-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timekeeping.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index c4d2a8751f3e..675f720a848b 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -607,6 +607,7 @@ void timekeeping_set_tai_offset(s32 tai_offset) __timekeeping_set_tai_offset(tk, tai_offset); write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags); + clock_was_set(); } /** @@ -1639,7 +1640,7 @@ int do_adjtimex(struct timex *txc) struct timekeeper *tk = &timekeeper; unsigned long flags; struct timespec ts; - s32 tai; + s32 orig_tai, tai; int ret; /* Validate the data before disabling interrupts */ @@ -1663,10 +1664,13 @@ int do_adjtimex(struct timex *txc) raw_spin_lock_irqsave(&timekeeper_lock, flags); write_seqcount_begin(&timekeeper_seq); - tai = tk->tai_offset; + orig_tai = tai = tk->tai_offset; ret = __do_adjtimex(txc, &ts, &tai); - __timekeeping_set_tai_offset(tk, tai); + if (tai != orig_tai) { + __timekeeping_set_tai_offset(tk, tai); + clock_was_set_delayed(); + } write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags); |