printk("CPU#%d: NMI appears to be stuck (%d)!\n", 
endflag = 1; printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", 
static int __init check_nmi_watchdog (void){	int *counts;	int cpu;	if (nmi_watchdog == NMI_NONE)		return 0;	if (nmi_watchdog == NMI_LOCAL_APIC && !cpu_has_lapic())  {		nmi_watchdog = NMI_NONE;		return -1; 	}		counts = kmalloc(NR_CPUS * sizeof(int),GFP_KERNEL);	if (!counts) {		nmi_watchdog = NMI_NONE;		return 0;	}	printk(KERN_INFO "Testing NMI watchdog ... ");	for (cpu = 0; cpu < NR_CPUS; cpu++)		counts[cpu] = cpu_pda[cpu].__nmi_count; 	local_irq_enable();	mdelay((10*1000)/nmi_hz); // wait 10 ticks	for (cpu = 0; cpu < NR_CPUS; cpu++) {		if (cpu_pda[cpu].__nmi_count - counts[cpu] <= 5) {			printk("CPU#%d: NMI appears to be stuck (%d)!\n", 			       cpu,			       cpu_pda[cpu].__nmi_count);			nmi_active = 0;			lapic_nmi_owner &= ~LAPIC_NMI_WATCHDOG;			kfree(counts);			return -1;		}	}	printk("OK.\n");	/* now that we know it works we can reduce NMI frequency to	   something more reasonable; makes a difference in some configs */	if (nmi_watchdog == NMI_LOCAL_APIC)		nmi_hz = 1;	kfree(counts);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/751521149a05e308d863d01ced61080ce1a2ec99/nmi.c/clean/arch/x86_64/kernel/nmi.c