[PATCH] arm64: Improve parking of stopped CPUs
Jayachandran C
jnair at caviumnetworks.com
Wed Feb 1 01:48:52 PST 2017
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 at 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
More information about the linux-arm-kernel
mailing list