timekeeping: Fix CLOCK_TAI timer/nanosleep delays
authorJohn Stultz <john.stultz@linaro.org>
Wed, 11 Dec 2013 01:13:35 +0000 (17:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2014 21:48:03 +0000 (13:48 -0800)
commita8ad6b67721e81c2e181ae3e0f3aea79da779cd7
treece0580642125acf6d0d9762ddab30584d9585d93
parent77535a0a168b2bf7c4aa35a20792a6e895844424
timekeeping: Fix CLOCK_TAI timer/nanosleep delays

commit 04005f6011e3b504cd4d791d9769f7cb9a3b2eae upstream.

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>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/time/timekeeping.c