There's no need to print all the CPUs that are ok, only the ones that
got stuck.
The resulting output is either:
Testing NMI watchdog on all CPUs: 1 4 6 stuck
or
Testing NMI watchdog on all CPUs: ok
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
{
static unsigned int __initdata prev_nmi_count[NR_CPUS];
int cpu;
-
+ bool_t ok = 1;
+
if ( !nmi_watchdog )
return 0;
- printk("Testing NMI watchdog --- ");
+ printk("Testing NMI watchdog on all CPUs:");
for_each_online_cpu ( cpu )
prev_nmi_count[cpu] = nmi_count(cpu);
for_each_online_cpu ( cpu )
{
if ( nmi_count(cpu) - prev_nmi_count[cpu] <= 5 )
- printk("CPU#%d stuck. ", cpu);
- else
- printk("CPU#%d okay. ", cpu);
+ {
+ printk(" %d", cpu);
+ ok = 0;
+ }
}
- printk("\n");
+ printk(" %s\n", ok ? "ok" : "stuck");
/*
* Now that we know it works we can reduce NMI frequency to