clocksource: Fix abs() usage w/ 64bit values
authorJohn Stultz <john.stultz@linaro.org>
Tue, 15 Sep 2015 01:05:20 +0000 (18:05 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 17 Nov 2015 15:54:41 +0000 (15:54 +0000)
commit3f9808099be442aaca2b9ba5c7ef7c67c6382c23
tree27187061b9f2fc071f87a97dab2e473b8b8f7d5d
parente1263d46df6f5f96bc6abd039684b7778a72bab3
clocksource: Fix abs() usage w/ 64bit values

commit 67dfae0cd72fec5cd158b6e5fb1647b7dbe0834c upstream.

This patch fixes one cases where abs() was being used with 64-bit
nanosecond values, where the result may be capped at 32-bits.

This potentially could cause watchdog false negatives on 32-bit
systems, so this patch addresses the issue by using abs64().

Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1442279124-7309-2-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/time/clocksource.c