FreeBSD/sys/x86/x86/mca.c
/*
 * For resume, reset the threshold for any banks we monitor back to
 * one and throw away the timestamp of the last interrupt.
 */
For resume, reset the threshold for any banks we monitor back to
one and throw away the timestamp of the last interrupt.
For resume reset the threshold for any banks we monitor back to one and throw away the timestamp of the last interrupt .
static void
cmci_resume(int i)
{
	struct cmc_state *cc;
	uint64_t ctl;
	KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid)));
	if (!(PCPU_GET(cmci_mask) & 1 << i))
		return;
	cc = &cmc_state[PCPU_GET(cpuid)][i];
	cc->last_intr = -ticks;
	ctl = rdmsr(MSR_MC_CTL2(i));
	ctl &= ~MC_CTL2_THRESHOLD;
	ctl |= MC_CTL2_CMCI_EN | 1;
	wrmsr(MSR_MC_CTL2(i), ctl);
}
static void cmci_resume ( int i ) { struct cmc_state * cc ; uint64_t ctl ; KASSERT ( i < mca_banks , ( " " , PCPU_GET ( cpuid ) ) ) ; if ( ! ( PCPU_GET ( cmci_mask ) & 1 << i ) ) return ; cc = & cmc_state [ PCPU_GET ( cpuid ) ] [ i ] ; cc -> last_intr = - ticks ; ctl = rdmsr ( MSR_MC_CTL2 ( i ) ) ; ctl &= ~ MC_CTL2_THRESHOLD ; ctl |= MC_CTL2_CMCI_EN | 1 ; wrmsr ( MSR_MC_CTL2 ( i ) , ctl ) ; }
For resume, reset the threshold for any banks we monitor back to
 one and throw away the timestamp of the last interrupt.
For resume reset the threshold for any banks we monitor back to one and throw away the timestamp of the last interrupt .
/* Ignore banks not monitored by this CPU. */