From: Borislav Petkov <bp@alien8.de>
To: "Ghannam, Yazen" <Yazen.Ghannam@amd.com>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
Tony Luck <tony.luck@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers
Date: Fri, 7 Apr 2017 23:35:00 +0200 [thread overview]
Message-ID: <20170407213500.6wanc4ya5ormrjyt@pd.tnic> (raw)
In-Reply-To: <BN6PR1201MB01317CEF66FCA08CF2843663F80C0@BN6PR1201MB0131.namprd12.prod.outlook.com>
On Fri, Apr 07, 2017 at 08:37:03PM +0000, Ghannam, Yazen wrote:
> CEs will get picked up by polling or if we hit a threshold.
I think we should be pre-emptive here and simply log the error. No use
waiting until something polling finally gets its hands on it - we're
looking at the signature so we might just as well log it.
> Okay. But do we need a return value? I'm thinking we can go through all banks
> and log any and all Deferred errors rather than just the first one we find. I asked
> and this is the preferred method like how we do in the #MC handler. The same
> applies to the thresholding interrupt handler.
... and not only the deferred errors but the CEs too.
Which would make the whole code a *lot* simpler. You simply iterate over
banks:
for_each_bank()
log_error()
if (smca)
log_error_from_de_regs()
Purely pseudocode of course.
And there's no need to go and look whether the error is a deferred
error or whatnot. In the majority of the cases it will be because we're
in the #DF handler and it better be raised for a #DF.
But even if we see something else, we should simply log it. As long as
it is a valid error signature there's nothing wrong with us logging it
and clearing the regs. The earlier we do so, the lower the probability
for setting the overflow bit.
Yeah, that should be the simplest and most robust way without missing
out on any errors. Hmm, I like it.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2017-04-07 21:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 17:24 Yazen Ghannam
2017-04-04 17:24 ` [PATCH v2 2/2] x86/mce/AMD: Carve out SMCA bank configuration Yazen Ghannam
2017-04-05 14:19 ` Borislav Petkov
2017-04-05 13:39 ` [PATCH v2 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers Borislav Petkov
2017-04-05 14:52 ` Ghannam, Yazen
2017-04-05 16:44 ` Borislav Petkov
2017-04-05 17:06 ` Ghannam, Yazen
2017-04-05 17:22 ` Borislav Petkov
2017-04-05 17:53 ` Ghannam, Yazen
2017-04-05 18:22 ` Borislav Petkov
2017-04-05 19:29 ` Ghannam, Yazen
2017-04-05 20:04 ` Borislav Petkov
2017-04-07 20:37 ` Ghannam, Yazen
2017-04-07 21:35 ` Borislav Petkov [this message]
2017-04-11 12:53 ` Ghannam, Yazen
2017-04-11 13:12 ` Borislav Petkov
2017-04-11 13:18 ` Ghannam, Yazen
2017-04-11 13:24 ` Borislav Petkov
2017-04-11 13:32 ` Ghannam, Yazen
2017-04-11 13:35 ` Borislav Petkov
2017-04-11 13:50 ` Ghannam, Yazen
2017-04-11 13:54 ` Borislav Petkov
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=20170407213500.6wanc4ya5ormrjyt@pd.tnic \
--to=bp@alien8.de \
--cc=Yazen.Ghannam@amd.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®