lkml.org 
[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] softlockup: stop spurious softlockup messages due to overflow
Date
Ensure additions on touch_ts do not overflow.  This can occur 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.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
kernel/softlockup.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 0d4c789..90d9aa0 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -111,10 +111,10 @@ int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
void softlockup_tick(void)
{
int this_cpu = smp_processor_id();
- unsigned long touch_ts = per_cpu(softlockup_touch_ts, this_cpu);
+ unsigned long long touch_ts = per_cpu(softlockup_touch_ts, this_cpu);
unsigned long print_ts;
struct pt_regs *regs = get_irq_regs();
- unsigned long now;
+ unsigned long long now;

/* Is detection switched off? */
if (!per_cpu(softlockup_watchdog, this_cpu) || softlockup_thresh <= 0) {
@@ -165,7 +165,7 @@ void softlockup_tick(void)
per_cpu(softlockup_print_ts, this_cpu) = touch_ts;

spin_lock(&print_lock);
- printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n",
+ printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %llus! [%s:%d]\n",
this_cpu, now - touch_ts,
current->comm, task_pid_nr(current));
print_modules();
--
1.6.3.3


\
 
 \ /
  Last update: 2010-03-15 15:03    [W:0.062 / U:5.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site