[PATCH 2/3] arm: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus()

Pingfan Liu kernelfans at gmail.com
Thu Jan 6 18:05:07 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: 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>
To: linux-arm-kernel at lists.infradead.org
---
 arch/arm/kernel/reboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c
index 3044fcb8d073..898405682e08 100644
--- a/arch/arm/kernel/reboot.c
+++ b/arch/arm/kernel/reboot.c
@@ -91,7 +91,7 @@ void soft_restart(unsigned long addr)
  */
 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