Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2017 22:30:22 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313751 - head/sys/x86/x86
Message-ID:  <201702142230.v1EMUMsl081138@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue Feb 14 22:30:22 2017
New Revision: 313751
URL: https://svnweb.freebsd.org/changeset/base/313751

Log:
  mca: fix writes to MSR_MC_CTL2 in cmci_update
  
  Previously, if the threshold was changed, then MC_CTL2_CMCI_EN would get
  cleared and the logic would switch to the polling only mode.
  
  Discussed with:	jhb
  MFC after:	2 weeks

Modified:
  head/sys/x86/x86/mca.c

Modified: head/sys/x86/x86/mca.c
==============================================================================
--- head/sys/x86/x86/mca.c	Tue Feb 14 21:56:01 2017	(r313750)
+++ head/sys/x86/x86/mca.c	Tue Feb 14 22:30:22 2017	(r313751)
@@ -548,7 +548,7 @@ cmci_update(enum scan_mode mode, int ban
 			limit = min(limit << 1, cc->max_threshold);
 			ctl &= ~MC_CTL2_THRESHOLD;
 			ctl |= limit;
-			wrmsr(MSR_MC_CTL2(bank), limit);
+			wrmsr(MSR_MC_CTL2(bank), ctl);
 		}
 		cc->last_intr = ticks;
 		return;
@@ -581,7 +581,7 @@ cmci_update(enum scan_mode mode, int ban
 	if ((ctl & MC_CTL2_THRESHOLD) != limit) {
 		ctl &= ~MC_CTL2_THRESHOLD;
 		ctl |= limit;
-		wrmsr(MSR_MC_CTL2(bank), limit);
+		wrmsr(MSR_MC_CTL2(bank), ctl);
 	}
 }
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702142230.v1EMUMsl081138>