diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index f4152a69277f..db087d7e106d 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -104,7 +104,7 @@ static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec64 wtm) | |||
104 | */ | 104 | */ |
105 | set_normalized_timespec64(&tmp, -tk->wall_to_monotonic.tv_sec, | 105 | set_normalized_timespec64(&tmp, -tk->wall_to_monotonic.tv_sec, |
106 | -tk->wall_to_monotonic.tv_nsec); | 106 | -tk->wall_to_monotonic.tv_nsec); |
107 | WARN_ON_ONCE(tk->offs_real.tv64 != timespec64_to_ktime(tmp).tv64); | 107 | WARN_ON_ONCE(tk->offs_real != timespec64_to_ktime(tmp)); |
108 | tk->wall_to_monotonic = wtm; | 108 | tk->wall_to_monotonic = wtm; |
109 | set_normalized_timespec64(&tmp, -wtm.tv_sec, -wtm.tv_nsec); | 109 | set_normalized_timespec64(&tmp, -wtm.tv_sec, -wtm.tv_nsec); |
110 | tk->offs_real = timespec64_to_ktime(tmp); | 110 | tk->offs_real = timespec64_to_ktime(tmp); |
@@ -571,7 +571,7 @@ EXPORT_SYMBOL_GPL(pvclock_gtod_unregister_notifier); | |||
571 | static inline void tk_update_leap_state(struct timekeeper *tk) | 571 | static inline void tk_update_leap_state(struct timekeeper *tk) |
572 | { | 572 | { |
573 | tk->next_leap_ktime = ntp_get_next_leap(); | 573 | tk->next_leap_ktime = ntp_get_next_leap(); |
574 | if (tk->next_leap_ktime.tv64 != KTIME_MAX) | 574 | if (tk->next_leap_ktime != KTIME_MAX) |
575 | /* Convert to monotonic time */ | 575 | /* Convert to monotonic time */ |
576 | tk->next_leap_ktime = ktime_sub(tk->next_leap_ktime, tk->offs_real); | 576 | tk->next_leap_ktime = ktime_sub(tk->next_leap_ktime, tk->offs_real); |
577 | } | 577 | } |
@@ -2250,7 +2250,7 @@ ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq, ktime_t *offs_real, | |||
2250 | } | 2250 | } |
2251 | 2251 | ||
2252 | /* Handle leapsecond insertion adjustments */ | 2252 | /* Handle leapsecond insertion adjustments */ |
2253 | if (unlikely(base.tv64 >= tk->next_leap_ktime.tv64)) | 2253 | if (unlikely(base >= tk->next_leap_ktime)) |
2254 | *offs_real = ktime_sub(tk->offs_real, ktime_set(1, 0)); | 2254 | *offs_real = ktime_sub(tk->offs_real, ktime_set(1, 0)); |
2255 | 2255 | ||
2256 | } while (read_seqcount_retry(&tk_core.seq, seq)); | 2256 | } while (read_seqcount_retry(&tk_core.seq, seq)); |