Skip to contentSkip to conversation

x86/mce: Add macros for corrected error count bit field

PATCH New Borislav Petkov 1 participant 1 message Sep 26, 2018 EDAC-core

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH v2 2/2 x86/mce: Add macros for corrected error count bit field

Quoted 19 lines · Tony

From: Qiuxu Zhuo <[email protected]>

The bit field 52:38 of MCi_STATUS is for corrected error count. Add {*_SHIFT|*_MASK|*_CEC(c)} macros for the bit field.

---

V2: Just the CEC change. Vertical alignment of other fields fixed in part 1

 arch/x86/include/asm/mce.h | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/include/asm/mce.h +0 -0
index 37b29e841757..a81a22e3592c 100644

arch/x86/include/asm/mce.h line 43

Quoted 5 lines
arch/x86/include/asm/mce.h +2 -0
@@ -39,6 +39,9 @@
 #define MCI_STATUS_PCC		BIT_ULL(57)  /* processor context corrupt */
 #define MCI_STATUS_S		BIT_ULL(56)  /* Signaled machine check */
 #define MCI_STATUS_AR		BIT_ULL(55)  /* Action required */
+#define MCI_STATUS_CEC_SHIFT	38           /* Corrected Error Count */
+#define MCI_STATUS_CEC_MASK	0x1fffc000000000ULL

GENMASK_ULL(52,38) right?