| Submitter | Herton Ronaldo Krzesinski |
|---|---|
| Date | Feb. 19, 2013, 6:49 p.m. |
| Message ID | <1361299784-8830-74-git-send-email-herton.krzesinski@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/221843/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index c5531db..747ab28 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -121,6 +121,9 @@ static int s390_next_ktime(ktime_t expires, nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); do_div(nsecs, 125); S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); + /* Program the maximum value if we have an overflow (== year 2042) */ + if (unlikely(S390_lowcore.clock_comparator < sched_clock_base_cc)) + S390_lowcore.clock_comparator = -1ULL; set_clock_comparator(S390_lowcore.clock_comparator); return 0; }