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@xxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Valentin Schneider <valentin.schneider@xxxxxxx> Cc: Vincent Donnefort <vincent.donnefort@xxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: YueHaibing <yuehaibing@xxxxxxxxxx> Cc: Baokun Li <libaokun1@xxxxxxxxxx> Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Valentin Schneider <valentin.schneider@xxxxxxx> Cc: kexec@xxxxxxxxxxxxxxxxxxx Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> To: linux-ia64@xxxxxxxxxxxxxxx Cc: Russell King <linux@xxxxxxxxxxxxxxx> Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> Cc: Lee Jones <lee.jones@xxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Mark Rutland <mark.rutland@xxxxxxx> Cc: Peter Collingbourne <pcc@xxxxxxxxxx> Cc: Marc Zyngier <maz@xxxxxxxxxx> To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx To: linux-kernel@xxxxxxxxxxxxxxx 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 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec