]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: kexec: Mark CPU offline before disabling local IRQ
authorDengcheng Zhu <dzhu@wavecomp.com>
Tue, 11 Sep 2018 21:49:20 +0000 (14:49 -0700)
committerPaul Burton <paul.burton@mips.com>
Fri, 21 Sep 2018 21:25:20 +0000 (14:25 -0700)
After changing CPU online status, it will not be sent any IPIs such as in
__flush_cache_all() on software coherency systems. Do this before disabling
local IRQ.

Signed-off-by: Dengcheng Zhu <dzhu@wavecomp.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20571/
Cc: pburton@wavecomp.com
Cc: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Cc: rachel.mozes@intel.com
arch/mips/kernel/crash.c
arch/mips/kernel/machine_kexec.c

index d455363d51c3d0e6e441ac65c2b4303fffe87117..4c07a43a3242a1ebe96004de447060b0c0888fbd 100644 (file)
@@ -36,6 +36,9 @@ static void crash_shutdown_secondary(void *passed_regs)
        if (!cpu_online(cpu))
                return;
 
+       /* We won't be sent IPIs any more. */
+       set_cpu_online(cpu, false);
+
        local_irq_disable();
        if (!cpumask_test_cpu(cpu, &cpus_in_crash))
                crash_save_cpu(regs, cpu);
index 8b574bcd39ba8868364c7d22e355e96cd4e46d70..4b3726e4fe3ac68b7236dd67abf0db79298d6b74 100644 (file)
@@ -118,6 +118,9 @@ machine_kexec(struct kimage *image)
                        *ptr = (unsigned long) phys_to_virt(*ptr);
        }
 
+       /* Mark offline BEFORE disabling local irq. */
+       set_cpu_online(smp_processor_id(), false);
+
        /*
         * we do not want to be bothered.
         */