From: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
To: <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
<tony.luck@intel.com>, <bp@alien8.de>, <x86@kernel.org>
Cc: <ashok.raj@intel.com>, <linux-kernel@vger.kernel.org>,
<linux-edac@vger.kernel.org>, <peterz@infradead.org>,
<luto@kernel.org>, <dvlasenk@redhat.com>,
<ross.zwisler@linux.intel.com>, <dirk.j.brandewie@intel.com>
Subject: [PATCH V2 1/2] x86/mcheck: Add Scalable MCA cpuid bit
Date: Wed, 28 Oct 2015 14:03:29 -0500 [thread overview]
Message-ID: <1446059010-28010-2-git-send-email-Aravind.Gopalakrishnan@amd.com> (raw)
In-Reply-To: <1446059010-28010-1-git-send-email-Aravind.Gopalakrishnan@amd.com>
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
next prev parent reply other threads:[~2015-10-28 19:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 19:03 [PATCH V2 0/2] Add new features introduced in AMD Fam17h Aravind Gopalakrishnan
2015-10-28 19:03 ` Aravind Gopalakrishnan [this message]
2015-10-30 10:26 ` [PATCH V2 1/2] x86/mcheck: Add Scalable MCA cpuid bit Borislav Petkov
2015-10-28 19:03 ` [PATCH V2 2/2] x86/cpufeature: Add CLZERO feature Aravind Gopalakrishnan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446059010-28010-2-git-send-email-Aravind.Gopalakrishnan@amd.com \
--to=aravind.gopalakrishnan@amd.com \
--cc=ashok.raj@intel.com \
--cc=bp@alien8.de \
--cc=dirk.j.brandewie@intel.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ross.zwisler@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome