Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 1/2] arm64: Improve parking of stopped CPUs
@ 2019-06-17 20:35 Aaro Koskinen
  2019-06-17 20:35 ` [PATCH v2 2/2] arm64: Implement panic_smp_self_stop() Aaro Koskinen
  2019-06-25 15:43 ` [PATCH v2 1/2] arm64: Improve parking of stopped CPUs Catalin Marinas
  0 siblings, 2 replies; 4+ messages in thread
From: Aaro Koskinen @ 2019-06-17 20:35 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>
Acked-by: Will Deacon <will.deacon@arm.com>
---

	v2: Add Acked-by

	v1: https://patchwork.kernel.org/patch/10988099/

 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	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 20:35 [PATCH v2 1/2] arm64: Improve parking of stopped CPUs Aaro Koskinen
2019-06-17 20:35 ` [PATCH v2 2/2] arm64: Implement panic_smp_self_stop() Aaro Koskinen
2019-06-18 12:51   ` Will Deacon
2019-06-25 15:43 ` [PATCH v2 1/2] arm64: Improve parking of stopped CPUs Catalin Marinas

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox