timekeeping: Fix CLOCK_TAI timer/nanosleep delays
authorJohn Stultz <john.stultz@linaro.org>
Wed, 11 Dec 2013 01:13:35 +0000 (17:13 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Mon, 23 Dec 2013 19:54:34 +0000 (11:54 -0800)
commit04005f6011e3b504cd4d791d9769f7cb9a3b2eae
tree9d2d3283a854a9dca0cee332069679818f674963
parent47a1b796306356f358e515149d86baf0cc6bf007
timekeeping: Fix CLOCK_TAI timer/nanosleep delays

A think-o in the calculation of the monotonic -> tai time offset
results in CLOCK_TAI timers and nanosleeps to expire late (the
latency is ~2x the tai offset).

Fix this by adding the tai offset from the realtime offset instead
of subtracting.

Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: stable <stable@vger.kernel.org> #3.10+
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/timekeeping.c