From: David Vrabel Date: Thu, 15 May 2014 13:32:36 +0000 (+0200) Subject: x86/nmi: be less verbose when testing the NMI watchdog X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5002 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f64b1901564b6206dbbe946699619fcd22446de8;p=xen.git x86/nmi: be less verbose when testing the NMI watchdog 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 Reviewed-by: Andrew Cooper Reviewed-by: Tim Deegan --- diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index 18d3820b76..f5810a4cdc 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -118,11 +118,12 @@ int __init check_nmi_watchdog (void) { 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); @@ -136,12 +137,13 @@ int __init check_nmi_watchdog (void) 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