From: Dengcheng Zhu <dzhu@wavecomp.com>
To: Paul Burton <pburton@wavecomp.com>,
"ralf@linux-mips.org" <ralf@linux-mips.org>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
"rachel.mozes@intel.com" <rachel.mozes@intel.com>,
Dengcheng Zhu <dzhu@wavecomp.com>
Subject: [mips-next PATCH] MIPS: kdump: Mark cpu back online before rebooting
Date: Wed, 26 Sep 2018 19:49:10 +0000 [thread overview]
Message-ID: <20180926194847.8734-1-dzhu@wavecomp.com> (raw)
The crash utility initializes cpu state by reading the system kernel
memory, which is copied into vmcore.
It is also natural to preserve the online state for CPUs at crash.
Failing to do so could make the analysis tool present info for only 1 CPU
by default, and unable to find panic task.
Signed-off-by: Dengcheng Zhu <dzhu@wavecomp.com>
---
arch/mips/kernel/machine_kexec.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 93b8353eece4..5c5b4351893e 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -171,6 +171,16 @@ void kexec_reboot(void)
{
void (*do_kexec)(void) __noreturn;
+ /*
+ * We know we were online, and there will be no incoming IPIs at
+ * this point. Mark online again before rebooting so that the crash
+ * analysis tool will see us correctly.
+ */
+ set_cpu_online(smp_processor_id(), true);
+
+ /* Ensure remote CPUs observe that we're online before rebooting. */
+ smp_mb__after_atomic();
+
#ifdef CONFIG_SMP
if (smp_processor_id() > 0) {
/*
--
2.17.1
next reply other threads:[~2018-09-26 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 19:49 Dengcheng Zhu [this message]
2018-09-28 17:10 ` [mips-next PATCH] MIPS: kdump: Mark cpu back online before rebooting Paul Burton
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=20180926194847.8734-1-dzhu@wavecomp.com \
--to=dzhu@wavecomp.com \
--cc=linux-mips@linux-mips.org \
--cc=pburton@wavecomp.com \
--cc=rachel.mozes@intel.com \
--cc=ralf@linux-mips.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