summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayachandran C <jnair@caviumnetworks.com>2019-06-17 23:35:18 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2019-06-25 16:42:09 +0100
commitdccc9da22dedad203acea355b0e4d946b71172e5 (patch)
treef2aa9c5784b49699700577770856f8c77c9a6f45
parentca9503fc9e9812aa6258e55d44edb03eb30fc46f (diff)
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 <jnair@caviumnetworks.com> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm64/kernel/smp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 83cdb0aa2ff1..932461da5dd7 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