aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/kernel/machine_kexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/machine_kexec.c')
-rw-r--r--arch/mips/kernel/machine_kexec.c10
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) {
/*