diff options
-rw-r--r-- | kernel/time/timekeeping.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 051855fe68bc..d62682b6df4a 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -1278,7 +1278,6 @@ static inline unsigned int accumulate_nsecs_to_secs(struct timekeeper *tk) | |||
1278 | 1278 | ||
1279 | __timekeeping_set_tai_offset(tk, tk->tai_offset - leap); | 1279 | __timekeeping_set_tai_offset(tk, tk->tai_offset - leap); |
1280 | 1280 | ||
1281 | clock_was_set_delayed(); | ||
1282 | clock_set = TK_CLOCK_WAS_SET; | 1281 | clock_set = TK_CLOCK_WAS_SET; |
1283 | } | 1282 | } |
1284 | } | 1283 | } |
@@ -1442,6 +1441,19 @@ static void update_wall_time(void) | |||
1442 | write_seqcount_end(&timekeeper_seq); | 1441 | write_seqcount_end(&timekeeper_seq); |
1443 | out: | 1442 | out: |
1444 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); | 1443 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); |
1444 | if (clock_was_set) { | ||
1445 | /* | ||
1446 | * XXX - I'd rather we just call clock_was_set(), but | ||
1447 | * since we're currently holding the jiffies lock, calling | ||
1448 | * clock_was_set would trigger an ipi which would then grab | ||
1449 | * the jiffies lock and we'd deadlock. :( | ||
1450 | * The right solution should probably be droping | ||
1451 | * the jiffies lock before calling update_wall_time | ||
1452 | * but that requires some rework of the tick sched | ||
1453 | * code. | ||
1454 | */ | ||
1455 | clock_was_set_delayed(); | ||
1456 | } | ||
1445 | } | 1457 | } |
1446 | 1458 | ||
1447 | /** | 1459 | /** |
@@ -1702,11 +1714,13 @@ int do_adjtimex(struct timex *txc) | |||
1702 | if (tai != orig_tai) { | 1714 | if (tai != orig_tai) { |
1703 | __timekeeping_set_tai_offset(tk, tai); | 1715 | __timekeeping_set_tai_offset(tk, tai); |
1704 | timekeeping_update(tk, TK_MIRROR | TK_CLOCK_WAS_SET); | 1716 | timekeeping_update(tk, TK_MIRROR | TK_CLOCK_WAS_SET); |
1705 | clock_was_set_delayed(); | ||
1706 | } | 1717 | } |
1707 | write_seqcount_end(&timekeeper_seq); | 1718 | write_seqcount_end(&timekeeper_seq); |
1708 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); | 1719 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); |
1709 | 1720 | ||
1721 | if (tai != orig_tai) | ||
1722 | clock_was_set(); | ||
1723 | |||
1710 | ntp_notify_cmos_timer(); | 1724 | ntp_notify_cmos_timer(); |
1711 | 1725 | ||
1712 | return ret; | 1726 | return ret; |