From e7279202383804da6fe22a199bb339f32338cd1f Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Fri, 11 Aug 2023 15:18:30 +0800 Subject: [PATCH] zephyr: cpu: init cpu if context save is not support Fix multicore test issue on cavs platforms which don't support context save now, so need to init cpu when the core boot up. Signed-off-by: Rander Wang --- zephyr/lib/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index 3dde19dc38bc..480637bef216 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -148,7 +148,8 @@ int cpu_enable_core(int id) * initialization. By reinitializing the idle thread, we would overwrite the kernel structs * and the idle thread stack. */ - if (pm_state_next_get(id)->state == PM_STATE_ACTIVE) + if (IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE) && + pm_state_next_get(id)->state == PM_STATE_ACTIVE) z_init_cpu(id); #endif