From: Dengcheng Zhu <dzhu@wavecomp.com>
To: pburton@wavecomp.com, ralf@linux-mips.org
Cc: linux-mips@linux-mips.org, rachel.mozes@intel.com,
Dengcheng Zhu <dzhu@wavecomp.com>
Subject: [PATCH v5 1/5] MIPS: kexec: Mark CPU offline before disabling local IRQ
Date: Tue, 11 Sep 2018 14:49:20 -0700 [thread overview]
Message-ID: <20180911214924.21993-2-dzhu@wavecomp.com> (raw)
In-Reply-To: <20180911214924.21993-1-dzhu@wavecomp.com>
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>
---
arch/mips/kernel/crash.c | 3 +++
arch/mips/kernel/machine_kexec.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/arch/mips/kernel/crash.c b/arch/mips/kernel/crash.c
index d455363d51c3..4c07a43a3242 100644
--- a/arch/mips/kernel/crash.c
+++ b/arch/mips/kernel/crash.c
@@ -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);
diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 8b574bcd39ba..4b3726e4fe3a 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -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.
*/
--
2.17.1
next prev parent reply other threads:[~2018-09-11 21:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 21:49 [PATCH v5 0/5] MIPS: kexec/kdump: Fix smp reboot and other issues Dengcheng Zhu
2018-09-11 21:49 ` Dengcheng Zhu [this message]
2018-09-11 21:49 ` [PATCH v5 2/5] MIPS: kexec: Make a framework for both jumping and halting on nonboot CPUs Dengcheng Zhu
2018-12-27 20:02 ` Aurelien Jarno
2018-09-11 21:49 ` [PATCH v5 3/5] MIPS: kexec: CPS systems to halt " Dengcheng Zhu
2018-09-11 21:49 ` [PATCH v5 4/5] MIPS: kexec: Relax memory restriction Dengcheng Zhu
2018-09-11 21:49 ` [PATCH v5 5/5] MIPS: kexec: Use prepare method from Generic for UHI platforms Dengcheng Zhu
2018-09-23 0:23 ` [PATCH v5 0/5] MIPS: kexec/kdump: Fix smp reboot and other issues 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=20180911214924.21993-2-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;
as well as URLs for NNTP newsgroup(s).