lkml.org 
[lkml]   [2015]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] x86/mcheck: Add Scalable MCA cpuid bit
Date
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. Future additions to AMD MCE code
will first need to detect if SMCA is enabled before
enabling the new features.

Adding code to detect if it SMCA is enabled in this patch
and store that info in mce_vendor_flags structure.

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
---
arch/x86/include/asm/mce.h | 13 ++++++++++++-
arch/x86/kernel/cpu/mcheck/mce.c | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 2dbc0bf..63307b5 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -135,7 +135,18 @@ struct mce_vendor_flags {
* in HW and deferred error interrupts.
*/
succor : 1,
- __reserved_0 : 62;
+
+ /*
+ * Scalable MCA: This bit indicates support for MCAX
+ * (MCA EXtensions) which expands the register space
+ * for each MCA bank and also increases number of
+ * banks. Also, to accommodate the new banks and
+ * registers, the MCA register space is moved to a new
+ * MSR range
+ */
+ smca : 1,
+
+ __reserved_0 : 61;
};
extern struct mce_vendor_flags mce_flags;

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 17b5ec6..3d631c4 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1605,6 +1605,8 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
mce_amd_feature_init(c);
mce_flags.overflow_recov = !!(ebx & BIT(0));
mce_flags.succor = !!(ebx & BIT(1));
+ mce_flags.smca = !!(ebx & BIT(3));
+
break;
}

--
2.6.1


\
 
 \ /
  Last update: 2015-10-23 18:41    [W:0.111 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site