diff options
-rw-r--r-- | arch/s390/kernel/time.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index a5f4f5a1d24b..0aa98db8a80d 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -120,6 +120,9 @@ static int s390_next_ktime(ktime_t expires, | |||
120 | nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); | 120 | nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); |
121 | do_div(nsecs, 125); | 121 | do_div(nsecs, 125); |
122 | S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); | 122 | S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); |
123 | /* Program the maximum value if we have an overflow (== year 2042) */ | ||
124 | if (unlikely(S390_lowcore.clock_comparator < sched_clock_base_cc)) | ||
125 | S390_lowcore.clock_comparator = -1ULL; | ||
123 | set_clock_comparator(S390_lowcore.clock_comparator); | 126 | set_clock_comparator(S390_lowcore.clock_comparator); |
124 | return 0; | 127 | return 0; |
125 | } | 128 | } |