[PATCHv3 0/2] cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is stable

Pingfan Liu kernelfans at gmail.com
Sun May 8 21:13:03 PDT 2022


For the arches (arm/arm64/ia64/riscv), which relies on the cpu hot-removing
mechanism to implement "kexec -e", it is important to make sure 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.

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 at xmission.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Valentin Schneider <valentin.schneider at arm.com>
Cc: Vincent Donnefort <vincent.donnefort at arm.com>
Cc: Ingo Molnar <mingo at kernel.org>
Cc: YueHaibing <yuehaibing at huawei.com>
Cc: Baokun Li <libaokun1 at huawei.com>
Cc: Randy Dunlap <rdunlap at infradead.org>
Cc: Valentin Schneider <valentin.schneider at arm.com>
Cc: kexec at lists.infradead.org
Cc: Geert Uytterhoeven <geert at linux-m68k.org>
Cc: Kees Cook <keescook at chromium.org>
Cc: Jens Axboe <axboe at kernel.dk>
To: linux-ia64 at vger.kernel.org
Cc: Russell King <linux at armlinux.org.uk>
Cc: Guenter Roeck <linux at roeck-us.net>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Wolfram Sang <wsa+renesas at sang-engineering.com>
Cc: Lee Jones <lee.jones at linaro.org>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: Mark Rutland <mark.rutland at arm.com>
Cc: Peter Collingbourne <pcc at google.com>
Cc: Marc Zyngier <maz at kernel.org>
To: linux-arm-kernel at lists.infradead.org
To: linux-kernel at vger.kernel.org

Pingfan Liu (2):
  cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is
    stable
  arm/arm64/ia64: kexec: fix the primary cpu passed to
    smp_shutdown_nonboot_cpus()

 arch/arm/kernel/reboot.c    |  2 +-
 arch/arm64/kernel/process.c |  2 +-
 arch/ia64/kernel/process.c  |  2 +-
 kernel/cpu.c                | 16 ++++++++++------
 kernel/kexec_core.c         | 10 ++++------
 5 files changed, 17 insertions(+), 15 deletions(-)

-- 
2.31.1




More information about the linux-arm-kernel mailing list