linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: Improve parking of stopped CPUs
@ 2019-06-11 18:10 Aaro Koskinen
  2019-06-11 18:10 ` [PATCH 2/2] arm64: Implement panic_smp_self_stop() Aaro Koskinen
  2019-06-13  9:22 ` [PATCH 1/2] arm64: Improve parking of stopped CPUs Will Deacon
  0 siblings, 2 replies; 6+ messages in thread
From: Aaro Koskinen @ 2019-06-11 18:10 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, James Morse,
	Jayachandran Chandrasekharan Nair
  Cc: Aaro Koskinen, linux-arm-kernel, Aaro Koskinen

From: Jayachandran C <jnair@caviumnetworks.com>

The current code puts the stopped cpus in an 'yield' instruction loop.
Using a busy loop here is unnecessary, we can use the cpu_park_loop()
function here to do a wfi/wfe.

Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---

	This is a rebased resend of the patch:

		https://patchwork.kernel.org/patch/9549145/

 arch/arm64/kernel/smp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index bb4b3f07761a..1a1b96a50245 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -854,9 +854,7 @@ static void ipi_cpu_stop(unsigned int cpu)
 
 	local_daif_mask();
 	sdei_mask_local_cpu();
-
-	while (1)
-		cpu_relax();
+	cpu_park_loop();
 }
 
 #ifdef CONFIG_KEXEC_CORE
-- 
2.17.0


_______________________________________________
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] 6+ messages in thread

end of thread, other threads:[~2019-06-13  9:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 18:10 [PATCH 1/2] arm64: Improve parking of stopped CPUs Aaro Koskinen
2019-06-11 18:10 ` [PATCH 2/2] arm64: Implement panic_smp_self_stop() Aaro Koskinen
2019-06-12 15:18   ` James Morse
2019-06-12 22:38     ` Aaro Koskinen
2019-06-13  9:21   ` Will Deacon
2019-06-13  9:22 ` [PATCH 1/2] arm64: Improve parking of stopped CPUs Will Deacon

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