if (error_code != -1) 
if (error_code >= 0) 
void do_machine_check(struct pt_regs * regs, long error_code){	struct mce m, panicm;	int nowayout = (tolerant < 1); 	int kill_it = 0;	u64 mcestart = 0;	int i;	int panicm_found = 0;	if (regs)		notify_die(DIE_NMI, "machine check", regs, error_code, 255, SIGKILL);	if (!banks)		return;	memset(&m, 0, sizeof(struct mce));	m.cpu = hard_smp_processor_id();	rdmsrl(MSR_IA32_MCG_STATUS, m.mcgstatus);	if (!(m.mcgstatus & MCG_STATUS_RIPV))		kill_it = 1;		rdtscll(mcestart);	barrier();	for (i = 0; i < banks; i++) {		if (!bank[i])			continue;				m.misc = 0; 		m.addr = 0;		m.bank = i;		m.tsc = 0;		rdmsrl(MSR_IA32_MC0_STATUS + i*4, m.status);		if ((m.status & MCI_STATUS_VAL) == 0)			continue;		if (m.status & MCI_STATUS_EN) {			/* In theory _OVER could be a nowayout too, but			   assume any overflowed errors were no fatal. */			nowayout |= !!(m.status & MCI_STATUS_PCC);			kill_it |= !!(m.status & MCI_STATUS_UC);		}		if (m.status & MCI_STATUS_MISCV)			rdmsrl(MSR_IA32_MC0_MISC + i*4, m.misc);		if (m.status & MCI_STATUS_ADDRV)			rdmsrl(MSR_IA32_MC0_ADDR + i*4, m.addr);		mce_get_rip(&m, regs);		if (error_code != -1)			rdtscll(m.tsc);		wrmsrl(MSR_IA32_MC0_STATUS + i*4, 0);		mce_log(&m);		/* Did this bank cause the exception? */		/* Assume that the bank with uncorrectable errors did it,		   and that there is only a single one. */		if ((m.status & MCI_STATUS_UC) && (m.status & MCI_STATUS_EN)) {			panicm = m;			panicm_found = 1;		}		tainted |= TAINT_MACHINE_CHECK;	}	/* Never do anything final in the polling timer */	if (!regs)		goto out;	/* If we didn't find an uncorrectable error, pick	   the last one (shouldn't happen, just being safe). */	if (!panicm_found)		panicm = m;	if (nowayout)		mce_panic("Machine check", &panicm, mcestart);	if (kill_it) {		int user_space = 0;		if (m.mcgstatus & MCG_STATUS_RIPV)			user_space = panicm.rip && (panicm.cs & 3);				/* When the machine was in user space and the CPU didn't get		   confused it's normally not necessary to panic, unless you 		   are paranoid (tolerant == 0)		   RED-PEN could be more tolerant for MCEs in idle,		   but most likely they occur at boot anyways, where		   it is best to just halt the machine. */		if ((!user_space && (panic_on_oops || tolerant < 2)) ||		    (unsigned)current->pid <= 1)			mce_panic("Uncorrected machine check", &panicm, mcestart);		/* do_exit takes an awful lot of locks and has as		   slight risk of deadlocking. If you don't want that		   don't set tolerant >= 2 */		if (tolerant < 3)			do_exit(SIGBUS);	} out:	/* Last thing done in the machine check exception to clear state. */	wrmsrl(MSR_IA32_MCG_STATUS, 0);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d5172f263f76ca6d588f533c0989b22521fcbac2/mce.c/clean/arch/x86_64/kernel/mce.c