mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -v3 2/2] x86, MCE, fix MSR_IA32_MCI_CTL2 CMCI threshold setup
@ 2010-06-08  6:09 Huang Ying
  2010-06-11  6:04 ` [tip:x86/mce] x86, mce: Fix " tip-bot for Huang Ying
  0 siblings, 1 reply; 3+ messages in thread
From: Huang Ying @ 2010-06-08  6:09 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin; +Cc: LKML, Andi Kleen, Hidetoshi Seto

It is reported that CMCI is not raised when number of corrected error
reaches preset threshold. After inspection, it is found that
MSR_IA32_MCI_CTL2 threshold field is not setup properly. This patch
fixed it.

Value of MCI_CTL2_CMCI_THRESHOLD_MASK is fixed according to x86_64
Software Developer's Manual too.

Reported-by: Shaohui Zheng <shaohui.zheng@intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
 arch/x86/include/asm/mce.h             |    2 +-
 arch/x86/kernel/cpu/mcheck/mce_intel.c |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -40,7 +40,7 @@
 
 /* CTL2 register defines */
 #define MCI_CTL2_CMCI_EN		(1ULL << 30)
-#define MCI_CTL2_CMCI_THRESHOLD_MASK	0xffffULL
+#define MCI_CTL2_CMCI_THRESHOLD_MASK	0x7fffULL
 
 #define MCJ_CTX_MASK		3
 #define MCJ_CTX(flags)		((flags) & MCJ_CTX_MASK)
--- a/arch/x86/kernel/cpu/mcheck/mce_intel.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c
@@ -102,6 +102,7 @@ static void cmci_discover(int banks, int
 			continue;
 		}
 
+		val &= ~MCI_CTL2_CMCI_THRESHOLD_MASK;
 		val |= MCI_CTL2_CMCI_EN | CMCI_THRESHOLD;
 		wrmsrl(MSR_IA32_MCx_CTL2(i), val);
 		rdmsrl(MSR_IA32_MCx_CTL2(i), val);




^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH -v3 0/2] x86, MCE, FIX MSR_IA32_MCI_CTL2_CMCI threshold setup
@ 2010-05-18  5:36 Huang Ying
  2010-05-18  5:36 ` [PATCH -v3 2/2] x86, MCE, fix MSR_IA32_MCI_CTL2 CMCI " Huang Ying
  0 siblings, 1 reply; 3+ messages in thread
From: Huang Ying @ 2010-05-18  5:36 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin
  Cc: linux-kernel, ying.huang, andi, Hidetoshi Seto


Changelog:

v3:

- Separate patch into 2 patches, one for renaming, the other for threshold
  setup fixing.

v2:

- Rename CMCI_EN to MCI_CTL2_CMCI_EN and CMCI_THRESHOLD_MASK to
  MCI_CTL2_CMCI_THRESHOLD_MASK to make naming consistent.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-11  6:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-08  6:09 [PATCH -v3 2/2] x86, MCE, fix MSR_IA32_MCI_CTL2 CMCI threshold setup Huang Ying
2010-06-11  6:04 ` [tip:x86/mce] x86, mce: Fix " tip-bot for Huang Ying
  -- strict thread matches above, loose matches on Subject: below --
2010-05-18  5:36 [PATCH -v3 0/2] x86, MCE, FIX MSR_IA32_MCI_CTL2_CMCI " Huang Ying
2010-05-18  5:36 ` [PATCH -v3 2/2] x86, MCE, fix MSR_IA32_MCI_CTL2 CMCI " Huang Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®