From 68044bb23ec20a9fd802279f1786e6cadd9c830e Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 2 Aug 2012 18:56:52 -0400 Subject: time/rt: Fix up leap-second backport for RT changes The leap-second backport broke RT, and a few changes had to be done. 1) The second_overflow now encompasses ntp_leap_second, and since second_overflow is called with the xtime_lock held, we can not take that lock either. (this update was done during the rebase). 2) Change ktime_get_update_offsets() to use read_seqcount_begin() instead of read_seq_begin() (and retry). Signed-off-by: Steven Rostedt --- kernel/hrtimer.c | 1 - kernel/time/timekeeping.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index bca69288f61d..8b3d4233c753 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1625,7 +1625,6 @@ static void run_hrtimer_softirq(struct softirq_action *h) cpu_base->clock_was_set = 0; clock_was_set(); } - hrtimer_rt_run_pending(); } diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 8ce6912f17b4..4e2432a20fca 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1308,7 +1308,7 @@ ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot) u64 secs, nsecs; do { - seq = read_seqbegin(&timekeeper.lock); + seq = read_seqcount_begin(&timekeeper.seq); secs = timekeeper.xtime.tv_sec; nsecs = timekeeper.xtime.tv_nsec; @@ -1318,7 +1318,7 @@ ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot) *offs_real = timekeeper.offs_real; *offs_boot = timekeeper.offs_boot; - } while (read_seqretry(&timekeeper.lock, seq)); + } while (read_seqcount_retry(&timekeeper.seq, seq)); now = ktime_add_ns(ktime_set(secs, 0), nsecs); now = ktime_sub(now, *offs_real); -- cgit v1.2.3