| From 0c76cc9abf97eb9da3ac74ff5dc54e7a0a46fed8 Mon Sep 17 00:00:00 2001 |
| From: Steven Rostedt <rostedt@goodmis.org> |
| Date: Thu, 2 Aug 2012 18:56:52 -0400 |
| Subject: [PATCH 261/274] 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 <rostedt@goodmis.org> |
| --- |
| 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 bca6928..8b3d423 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 f4e5eaf..cadbe23 100644 |
| --- a/kernel/time/timekeeping.c |
| +++ b/kernel/time/timekeeping.c |
| @@ -1333,7 +1333,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; |
| @@ -1343,7 +1343,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); |
| -- |
| 1.7.10.4 |
| |