[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1452901836-27632-3-git-send-email-Aravind.Gopalakrishnan@amd.com>
Date: Fri, 15 Jan 2016 17:50:33 -0600
From: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@....com>
To: <tony.luck@...el.com>, <bp@...en8.de>, <tglx@...utronix.de>,
<mingo@...hat.com>, <hpa@...or.com>
CC: <x86@...nel.org>, <linux-edac@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH V2 2/5] x86/mcheck/AMD: Do not perform shared bank check for future processors
Fam17h and above should not require a check to see if a bank
is shared or not. For shared banks, there will always be only
one core that has visibility over the MSRs and only that
particular core will be allowed to write to the MSRs
Fixing the code to return early if we detect Fam17h or above.
No change in functionality for earlier processors
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@....com>
---
arch/x86/kernel/cpu/mcheck/mce_amd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index e99b150..da570a8 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -84,6 +84,14 @@ struct thresh_restart {
static inline bool is_shared_bank(int bank)
{
+ /*
+ * For Fam17h and above, we shouldn't require this check.
+ * Only the core that can see valid values on the MSRs has
+ * control over the respective MCA bank
+ */
+ if (mce_flags.smca)
+ return 0;
+
/* Bank 4 is for northbridge reporting and is thus shared */
return (bank == 4);
}
--
2.7.0
Powered by blists - more mailing lists