x86, nmi: clean UP NMI watchdog failure message
authorIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 13:34:32 +0000 (15:34 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 13:35:31 +0000 (15:35 +0200)
clean up the failure message - and redirect people to bugzilla
instead of lkml.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/nmi.c

index 919473ad4a293e8bfccdc6a8eacb1dad39bc9622..abb78a2cc4ad5d1a8e43fcf1430dd6245ac57f42 100644 (file)
@@ -114,6 +114,23 @@ static __init void nmi_cpu_busy(void *data)
 }
 #endif
 
+static void report_broken_nmi(int cpu, int *prev_nmi_count)
+{
+       printk(KERN_CONT "\n");
+
+       printk(KERN_WARNING
+               "WARNING: CPU#%d: NMI appears to be stuck (%d->%d)!\n",
+                       cpu, prev_nmi_count[cpu], get_nmi_count(cpu));
+
+       printk(KERN_WARNING
+               "Please report this to bugzilla.kernel.org,\n");
+       printk(KERN_WARNING
+               "and attach the output of the 'dmesg' command.\n");
+
+       per_cpu(wd_enabled, cpu) = 0;
+       atomic_dec(&nmi_active);
+}
+
 int __init check_nmi_watchdog(void)
 {
        unsigned int *prev_nmi_count;
@@ -141,19 +158,8 @@ int __init check_nmi_watchdog(void)
        for_each_online_cpu(cpu) {
                if (!per_cpu(wd_enabled, cpu))
                        continue;
-               if (get_nmi_count(cpu) - prev_nmi_count[cpu] <= 5) {
-                       printk("\n");
-                       printk(KERN_WARNING "WARNING: CPU#%d: NMI "
-                               "appears to be stuck (%d->%d)!\n",
-                               cpu,
-                               prev_nmi_count[cpu],
-                               get_nmi_count(cpu));
-                       printk(KERN_WARNING "Please report this to "
-                              "linux-kernel@vger.kernel.org and attach "
-                              "the output of 'dmesg' command.\n");
-                       per_cpu(wd_enabled, cpu) = 0;
-                       atomic_dec(&nmi_active);
-               }
+               if (get_nmi_count(cpu) - prev_nmi_count[cpu] <= 5)
+                       report_broken_nmi(cpu, prev_nmi_count);
        }
        endflag = 1;
        if (!atomic_read(&nmi_active)) {