Message ID | 20190617203519.328-1-aaro.koskinen@iki.fi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2,1/2] arm64: Improve parking of stopped CPUs | expand |
On Mon, Jun 17, 2019 at 11:35:18PM +0300, Aaro Koskinen wrote: > 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> Both patches queued for 5.3. Thanks.
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