kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Pingfan Liu <kernelfans@gmail.com>
To: kexec@lists.infradead.org
Subject: [PATCHv4 0/2] cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is stable
Date: Thu, 12 May 2022 11:06:17 +0800	[thread overview]
Message-ID: <20220512030619.13426-1-kernelfans@gmail.com> (raw)

For the architectures (arm/arm64/ia64/riscv), which relies on the cpu
hot-removing mechanism to implement "kexec -e", it is important to
ensure that the rebooting happens on a valid online cpu. And this logic
should have been guaranteed in migrate_to_reboot_cpu().

But the current code has either contradict (resolved by [2/2]) or
redundancy (resolved by [1/2]) about the logic.


V3 -> V4:
Fix the cpu hotplug enable before kexec-rebooting in powerpc.
Improve commit log and the code's note.

V2 -> V3:
Taking in [2/2], which also has problem with the valid rebooting
cpu. (I had sent three patches for different arches. But maybe it is
better to collapse them into one and collect acks from different arches'
maintainers )

Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vincent Donnefort <vincent.donnefort@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Baokun Li <libaokun1@huawei.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: kexec at lists.infradead.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
To: linux-ia64@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk>
Cc: Guenter Roeck <linux@roeck-us.net>

Pingfan Liu (2):
  cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is
    stable
  cpu/hotplug: Remove the input parameter primary_cpu of
    smp_shutdown_nonboot_cpus()

 arch/arm/kernel/reboot.c          |  2 +-
 arch/arm64/kernel/process.c       |  2 +-
 arch/ia64/kernel/process.c        |  2 +-
 arch/powerpc/kexec/core_64.c      |  1 +
 arch/riscv/kernel/machine_kexec.c |  2 +-
 include/linux/cpu.h               |  4 ++--
 kernel/cpu.c                      | 14 +++++++-------
 kernel/kexec_core.c               | 11 +++++------
 8 files changed, 19 insertions(+), 19 deletions(-)

-- 
2.31.1



             reply	other threads:[~2022-05-12  3:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  3:06 Pingfan Liu [this message]
2022-05-12  3:06 ` [PATCHv4 1/2] cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is stable Pingfan Liu

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=20220512030619.13426-1-kernelfans@gmail.com \
    --to=kernelfans@gmail.com \
    --cc=kexec@lists.infradead.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).