From dccc9da22dedad203acea355b0e4d946b71172e5 Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Mon, 17 Jun 2019 23:35:18 +0300 Subject: [PATCH] arm64: Improve parking of stopped CPUs 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 Signed-off-by: Aaro Koskinen Acked-by: Will Deacon Signed-off-by: Catalin Marinas --- 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 83cdb0a..932461d 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -850,9 +850,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.7.4