linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: Improve parking of stopped CPUs
@ 2017-02-01  9:48 Jayachandran C
  2017-02-01 14:16 ` Will Deacon
  2019-05-16 18:44 ` Aaro Koskinen
  0 siblings, 2 replies; 10+ messages in thread
From: Jayachandran C @ 2017-02-01  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm64/kernel/smp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index cbaab44..0691d2f 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -829,8 +829,7 @@ static void ipi_cpu_stop(unsigned int cpu)
 
 	local_irq_disable();
 
-	while (1)
-		cpu_relax();
+	cpu_park_loop();
 }
 
 /*
-- 
2.7.4

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

end of thread, other threads:[~2019-05-24 19:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-01  9:48 [PATCH] arm64: Improve parking of stopped CPUs Jayachandran C
2017-02-01 14:16 ` Will Deacon
2017-02-01 14:31   ` Suzuki K Poulose
2017-02-01 15:07     ` Will Deacon
2017-02-02  7:42       ` Jayachandran C
2019-05-16 18:44 ` Aaro Koskinen
2019-05-18 22:19   ` Jayachandran Chandrasekharan Nair
2019-05-18 23:12     ` Aaro Koskinen
2019-05-24 19:24       ` [EXT] " Jayachandran Chandrasekharan Nair
2019-05-23 10:05   ` 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).