From: tip-bot for John Stultz <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, john.stultz@linaro.org,
hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de
Subject: [tip:timers/core] timekeeping: Make sure to notify hrtimers when TAI offset changes
Date: Thu, 11 Apr 2013 01:30:06 -0700 [thread overview]
Message-ID: <tip-4e8f8b34b92b6514cc070aeb94d317cadd5071d7@git.kernel.org> (raw)
In-Reply-To: <1365622909-953-1-git-send-email-john.stultz@linaro.org>
Commit-ID: 4e8f8b34b92b6514cc070aeb94d317cadd5071d7
Gitweb: http://git.kernel.org/tip/4e8f8b34b92b6514cc070aeb94d317cadd5071d7
Author: John Stultz <john.stultz@linaro.org>
AuthorDate: Wed, 10 Apr 2013 12:41:49 -0700
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 11 Apr 2013 10:19:44 +0200
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>
---
kernel/time/timekeeping.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index c4d2a87..675f720 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);
prev parent reply other threads:[~2013-04-11 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 19:41 [PATCH] " John Stultz
2013-04-11 8:30 ` tip-bot for John Stultz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-4e8f8b34b92b6514cc070aeb94d317cadd5071d7@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome