Date: Mon, 27 Feb 2017 17:20:44 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r314349 - stable/11/sys/x86/x86 Message-ID: <201702271720.v1RHKiwc080108@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Feb 27 17:20:44 2017 New Revision: 314349 URL: https://svnweb.freebsd.org/changeset/base/314349 Log: MFC r313752,r314035: mca: use time_uptime instead of ticks for CMCI throttling Modified: stable/11/sys/x86/x86/mca.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mca.c ============================================================================== --- stable/11/sys/x86/x86/mca.c Mon Feb 27 17:18:07 2017 (r314348) +++ stable/11/sys/x86/x86/mca.c Mon Feb 27 17:20:44 2017 (r314349) @@ -73,7 +73,7 @@ enum scan_mode { */ struct cmc_state { int max_threshold; - int last_intr; + time_t last_intr; }; #endif @@ -533,7 +533,7 @@ cmci_update(enum scan_mode mode, int ban cc = &cmc_state[PCPU_GET(cpuid)][bank]; ctl = rdmsr(MSR_MC_CTL2(bank)); count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38; - delta = (u_int)(ticks - cc->last_intr); + delta = (u_int)(time_uptime - cc->last_intr); /* * If an interrupt was received less than cmc_throttle seconds @@ -550,7 +550,7 @@ cmci_update(enum scan_mode mode, int ban ctl |= limit; wrmsr(MSR_MC_CTL2(bank), limit); } - cc->last_intr = ticks; + cc->last_intr = time_uptime; return; } @@ -857,7 +857,7 @@ cmci_resume(int i) return; cc = &cmc_state[PCPU_GET(cpuid)][i]; - cc->last_intr = -ticks; + cc->last_intr = 0; ctl = rdmsr(MSR_MC_CTL2(i)); ctl &= ~MC_CTL2_THRESHOLD; ctl |= MC_CTL2_CMCI_EN | 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702271720.v1RHKiwc080108>