From 2eca87a1eab20d49ee4edceb1642325bd81ec020 Mon Sep 17 00:00:00 2001
From: Colin Ian King <email@example.com>
Date: Tue, 9 Mar 2010 16:19:18 +0000
Subject: [PATCH] softlockup: stop softlockup messages due to touch_ts math overflow
Ensure math does not overflow when touch_ts is close to the upper
bounds. This occurs when the top 32 bits of the TSC reach 0xffffffff
causing additions to touch_ts to overflow and this in turn generates
spurious softlockup warnings.
While this normally does not happen (since it requires an uptime of
possibly thousands of years, it may happen if the TSC warps during S3).
Signed-off-by: Colin Ian King <firstname.lastname@example.org>
kernel/softlockup.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
@@ -155,11 +155,13 @@ void softlockup_tick(void)
* Wake up the high-prio watchdog task twice per
* threshold timespan.
- if (now > touch_ts + softlockup_thresh/2)
+ if ((unsigned long long)now >
+ (unsigned long long)touch_ts + softlockup_thresh/2)
/* Warn about unreasonable delays: */
- if (now <= (touch_ts + softlockup_thresh))
+ if ((unsigned long long)now <=
+ ((unsigned long long)touch_ts + softlockup_thresh))
per_cpu(softlockup_print_ts, this_cpu) = touch_ts;