diff options
author | Dengcheng Zhu <dzhu@wavecomp.com> | 2018-09-26 21:49:10 +0200 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-09-28 19:09:03 +0200 |
commit | 82689ac663ac2f3fe89231b2f929fbdae178bb81 (patch) | |
tree | 91b0c5e088def7e4944a1a1add7c968e6fd70a39 /arch/mips/kernel/machine_kexec.c | |
parent | MIPS: MT: Remove obsolete cache flush repeat code (diff) | |
download | linux-82689ac663ac2f3fe89231b2f929fbdae178bb81.tar.xz linux-82689ac663ac2f3fe89231b2f929fbdae178bb81.zip |
MIPS: kdump: Mark cpu back online before rebooting
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>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20809/
Cc: Paul Burton <pburton@wavecomp.com>
Cc: "ralf@linux-mips.org" <ralf@linux-mips.org>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Cc: "rachel.mozes@intel.com" <rachel.mozes@intel.com>
Diffstat (limited to '')
-rw-r--r-- | arch/mips/kernel/machine_kexec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c index 35175eb2e8b0..93936dce04d6 100644 --- a/arch/mips/kernel/machine_kexec.c +++ b/arch/mips/kernel/machine_kexec.c @@ -173,6 +173,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) { /* |