From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/mce: Initialize "bank" when we find a fatal error in mce_no_way_out()
Date: Fri, 1 Feb 2019 10:36:17 -0800 [thread overview]
Message-ID: <20190201183616.GA24278@agluck-desk> (raw)
In-Reply-To: <20190201095553.GC31854@zn.tnic>
On Fri, Feb 01, 2019 at 10:55:53AM +0100, Borislav Petkov wrote:
> On Thu, Jan 31, 2019 at 04:33:41PM -0800, Tony Luck wrote:
> > if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
> > + m->bank = i;
>
> So conceptually this write belongs in...
>
> > mce_read_aux(m, i);
Really? That function starts with the comment
/*
* Read ADDR and MISC registers.
*/
and the name is pretty descriptive that it is "reading auxiliary" information.
>
> ... this function, i.e., in mce_read_aux() because it gets the bank
> number passed in already. And our calling pattern when populating struct
> mce is:
>
> mce_gather_info()
> mce_read_aux()
Only two exising uses:
1) in machine_check_poll()
mce_gather_info(&m, NULL);
for (each bank) {
m.bank = i;
mce_read_aux(&m, i);
...
}
2) in __mc_scan_banks
// mce_gather_info() already done in do_machine_check
for (each bank) {
m.bank = i;
mce_read_aux(m, i);
...
}
>
> so it'll be more robust if we moved it there.
It would be redundant to move it there for both
existing uses.
> Also, that argument "i" of mce_read_aux() is not very telling and it
> should be "bank" but that would complicate the stable backporting so if
> you feel like it, you could do a second, cleanup patch ontop to fix that
> too.
Agreed that "bank" is clearer than "i". But also agreed that should
be a separate patch for another day.
-Tony
next prev parent reply other threads:[~2019-02-01 18:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 0:33 [PATCH] x86/mce: Initialize "bank" when we find a fatal error in mce_no_way_out() Tony Luck
2019-02-01 9:55 ` Borislav Petkov
2019-02-01 18:36 ` Luck, Tony [this message]
2019-02-02 15:33 ` Borislav Petkov
2019-02-03 12:36 ` [tip:x86/urgent] x86/MCE: Initialize mce.bank in the case of " tip-bot for Tony Luck
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=20190201183616.GA24278@agluck-desk \
--to=tony.luck@intel.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--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