From: tip-bot for Yazen Ghannam <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: Yazen.Ghannam@amd.com, hpa@zytor.com, aravindksg.lkml@gmail.com,
linux-edac@vger.kernel.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, x86@kernel.org, bp@suse.de,
tglx@linutronix.de
Subject: [tip:ras/core] x86/mce/AMD: Reset Threshold Limit after logging error
Date: Wed, 16 Nov 2016 01:25:24 -0800 [thread overview]
Message-ID: <tip-18807ddb7f88d4ac3797302bafb18143d573e66f@git.kernel.org> (raw)
In-Reply-To: <1479244433-69267-1-git-send-email-Yazen.Ghannam@amd.com>
Commit-ID: 18807ddb7f88d4ac3797302bafb18143d573e66f
Gitweb: http://git.kernel.org/tip/18807ddb7f88d4ac3797302bafb18143d573e66f
Author: Yazen Ghannam <Yazen.Ghannam@amd.com>
AuthorDate: Tue, 15 Nov 2016 15:13:53 -0600
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 16 Nov 2016 09:57:11 +0100
x86/mce/AMD: Reset Threshold Limit after logging error
The error count field in MCA_MISC does not get reset by hardware when the
threshold has been reached. Software is expected to reset it. Currently,
the threshold limit only gets reset during init or when a user writes to
sysfs.
If the user is not monitoring threshold interrupts and resetting
the limit then the user will only see 1 interrupt when the limit is first
hit. So if, for example, the limit is set to 10 then only 1 interrupt will
be recorded after 10 errors even if 100 errors have occurred. The user may
then assume that only 10 errors have occurred.
Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1479244433-69267-1-git-send-email-Yazen.Ghannam@amd.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/mcheck/mce_amd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index e68a305..5b33702 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -665,6 +665,7 @@ static void amd_threshold_interrupt(void)
{
u32 low = 0, high = 0, address = 0;
unsigned int bank, block, cpu = smp_processor_id();
+ struct thresh_restart tr;
/* assume first bank caused it */
for (bank = 0; bank < mca_cfg.banks; ++bank) {
@@ -701,6 +702,11 @@ static void amd_threshold_interrupt(void)
log:
__log_error(bank, false, true, ((u64)high << 32) | low);
+
+ /* Reset threshold block after logging error. */
+ memset(&tr, 0, sizeof(tr));
+ tr.b = &per_cpu(threshold_banks, cpu)[bank]->blocks[block];
+ threshold_restart_bank(&tr);
}
/*
parent reply other threads:[~2016-11-16 9:25 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1479244433-69267-1-git-send-email-Yazen.Ghannam@amd.com>]
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=tip-18807ddb7f88d4ac3797302bafb18143d573e66f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=Yazen.Ghannam@amd.com \
--cc=aravindksg.lkml@gmail.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--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