From: Ashok Raj <ashok.raj@intel.com>
To: linux-kernel@vger.kernel.org
Cc: Ashok Raj <ashok.raj@intel.com>, Boris Petkov <bp@suse.de>,
linux-edac@vger.kernel.org, Tony Luck <tony.luck@intel.com>
Subject: [Patch V1 2/3] x86, mce: Refactor parts of mce_log() to reuse when logging from offline CPUs
Date: Thu, 24 Sep 2015 01:48:39 -0400 [thread overview]
Message-ID: <1443073720-3940-2-git-send-email-ashok.raj@intel.com> (raw)
In-Reply-To: <1443073720-3940-1-git-send-email-ashok.raj@intel.com>
Simply refactoring part of mce_log() to facilitate logging from offline
CPUs.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
---
arch/x86/kernel/cpu/mcheck/mce.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 48bd244..2df073d 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -152,16 +152,10 @@ static struct mce_log mcelog = {
.recordlen = sizeof(struct mce),
};
-void mce_log(struct mce *mce)
+static void mce_log_add(struct mce *mce)
{
unsigned next, entry;
- /* Emit the trace record: */
- trace_mce_record(mce);
-
- if (!mce_gen_pool_add(mce))
- irq_work_queue(&mce_irq_work);
-
mce->finished = 0;
wmb();
for (;;) {
@@ -199,6 +193,19 @@ void mce_log(struct mce *mce)
set_bit(0, &mce_need_notify);
}
+void mce_log(struct mce *mce)
+{
+ unsigned next, entry;
+
+ /* Emit the trace record: */
+ trace_mce_record(mce);
+
+ if (!mce_gen_pool_add(mce))
+ irq_work_queue(&mce_irq_work);
+
+ mce_log_add(mce);
+}
+
void mce_inject_log(struct mce *m)
{
mutex_lock(&mce_chrdev_read_mutex);
--
2.4.3
next prev parent reply other threads:[~2015-09-24 4:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 5:48 [Patch V1 1/3] x86, mce: MCE log size not enough for high core parts Ashok Raj
2015-09-24 5:48 ` Ashok Raj [this message]
2015-09-24 5:48 ` [Patch V1 3/3] x86, mce: Account for offline CPUs during MCE rendezvous Ashok Raj
2015-09-24 15:47 ` [Patch V1 1/3] x86, mce: MCE log size not enough for high core parts Borislav Petkov
2015-09-24 18:44 ` Luck, Tony
2015-09-24 18:52 ` Borislav Petkov
2015-09-24 19:00 ` Luck, Tony
2015-09-24 19:22 ` Borislav Petkov
2015-09-24 20:22 ` Raj, Ashok
2015-09-24 21:07 ` Borislav Petkov
2015-09-24 21:25 ` Raj, Ashok
2015-09-25 8:29 ` Borislav Petkov
2015-09-25 16:29 ` Raj, Ashok
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=1443073720-3940-2-git-send-email-ashok.raj@intel.com \
--to=ashok.raj@intel.com \
--cc=bp@suse.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/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