Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/mce: Add a Scalable MCA vendor flags bit

Scalable MCA (SMCA) is a new feature in AMD Fam17h processors
which indicates presence of MCA extensions.

MCA extensions expands existing register space for the MCE banks
and also introduces a new MSR range to accommodate new banks.

Add the detection bit.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
[ Reformat mce_vendor_flags definitions and save indentation levels. Improve comments. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1446207099-24948-2-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Aravind Gopalakrishnan and committed by
Ingo Molnar
c7f54d21 79ebdc95

+22 -12
+20 -12
arch/x86/include/asm/mce.h
··· 123 123 }; 124 124 125 125 struct mce_vendor_flags { 126 - /* 127 - * overflow recovery cpuid bit indicates that overflow 128 - * conditions are not fatal 129 - */ 130 - __u64 overflow_recov : 1, 126 + /* 127 + * Indicates that overflow conditions are not fatal, when set. 128 + */ 129 + __u64 overflow_recov : 1, 131 130 132 - /* 133 - * SUCCOR stands for S/W UnCorrectable error COntainment 134 - * and Recovery. It indicates support for data poisoning 135 - * in HW and deferred error interrupts. 136 - */ 137 - succor : 1, 138 - __reserved_0 : 62; 131 + /* 132 + * (AMD) SUCCOR stands for S/W UnCorrectable error COntainment and 133 + * Recovery. It indicates support for data poisoning in HW and deferred 134 + * error interrupts. 135 + */ 136 + succor : 1, 137 + 138 + /* 139 + * (AMD) SMCA: This bit indicates support for Scalable MCA which expands 140 + * the register space for each MCA bank and also increases number of 141 + * banks. Also, to accommodate the new banks and registers, the MCA 142 + * register space is moved to a new MSR range. 143 + */ 144 + smca : 1, 145 + 146 + __reserved_0 : 61; 139 147 }; 140 148 extern struct mce_vendor_flags mce_flags; 141 149
+2
arch/x86/kernel/cpu/mcheck/mce.c
··· 1605 1605 mce_amd_feature_init(c); 1606 1606 mce_flags.overflow_recov = !!(ebx & BIT(0)); 1607 1607 mce_flags.succor = !!(ebx & BIT(1)); 1608 + mce_flags.smca = !!(ebx & BIT(3)); 1609 + 1608 1610 break; 1609 1611 } 1610 1612