[PATCH 3/3] arm64: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus()
Pingfan Liu
kernelfans at gmail.com
Thu Jan 6 18:05:08 PST 2022
kernel_kexec()->migrate_to_reboot_cpu() has already pinned the
reboot thread on either reboot_cpu or the first online cpu.
So machine_shutdown() should pass smp_processor_id() as the primary cpu
to smp_shutdown_nonboot_cpus().
Signed-off-by: Pingfan Liu <kernelfans at gmail.com>
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 Zijlstra <peterz at infradead.org>
Cc: Peter Collingbourne <pcc at google.com>
Cc: Marc Zyngier <maz at kernel.org>
To: linux-arm-kernel at lists.infradead.org
---
arch/arm64/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index aacf2f5559a8..e1d2179ca845 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -85,7 +85,7 @@ void arch_cpu_idle_dead(void)
*/
void machine_shutdown(void)
{
- smp_shutdown_nonboot_cpus(reboot_cpu);
+ smp_shutdown_nonboot_cpus(smp_processor_id());
}
/*
--
2.31.1
More information about the linux-arm-kernel
mailing list