From b05c2f471899fde03e2cdfe3ea019a007fa31794 Mon Sep 17 00:00:00 2001 From: Chirag Kochar Date: Wed, 30 Aug 2023 10:01:39 +0000 Subject: [PATCH] arch: arm64: core: Fix issue IPI for non-booted core During Zephyr boot with SMP enabled, while z_smp_init is not completed yet and only boot core is running, incorrect code in broadcast_ipi API will cause following: 1. Generate IPI even if other cores are not booted. 2. Incorrect setting of sgi1r register. 3. All the affinity(1/2/3) value will be incorrect. Signed-off-by: Chirag Kochar --- arch/arm64/core/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/core/smp.c b/arch/arm64/core/smp.c index a7ef6671658..3fdb1b333d5 100644 --- a/arch/arm64/core/smp.c +++ b/arch/arm64/core/smp.c @@ -190,7 +190,7 @@ static void broadcast_ipi(unsigned int ipi) uint64_t target_mpidr = cpu_map[i]; uint8_t aff0; - if (mpidr == target_mpidr || mpidr == INV_MPID) { + if (mpidr == target_mpidr || target_mpidr == INV_MPID) { continue; }