linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] arm: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus()
       [not found] <20220107020508.9778-1-kernelfans@gmail.com>
@ 2022-01-07  2:05 ` Pingfan Liu
  2022-01-07  2:05 ` [PATCH 3/3] arm64: " Pingfan Liu
  1 sibling, 0 replies; 2+ messages in thread
From: Pingfan Liu @ 2022-01-07  2:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Pingfan Liu, Russell King, Guenter Roeck, Arnd Bergmann,
	Wolfram Sang, Lee Jones

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@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 3/3] arm64: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus()
       [not found] <20220107020508.9778-1-kernelfans@gmail.com>
  2022-01-07  2:05 ` [PATCH 2/3] arm: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus() Pingfan Liu
@ 2022-01-07  2:05 ` Pingfan Liu
  1 sibling, 0 replies; 2+ messages in thread
From: Pingfan Liu @ 2022-01-07  2:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Pingfan Liu, Catalin Marinas, Will Deacon, Mark Rutland,
	Peter Zijlstra, Peter Collingbourne, Marc Zyngier

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@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-07  2:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220107020508.9778-1-kernelfans@gmail.com>
2022-01-07  2:05 ` [PATCH 2/3] arm: kexec: fix the primary cpu passed to smp_shutdown_nonboot_cpus() Pingfan Liu
2022-01-07  2:05 ` [PATCH 3/3] arm64: " Pingfan Liu

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).