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 <rander.wang@intel.com>
This commit is contained in:
Rander Wang 2023-08-11 15:18:30 +08:00 committed by Liam Girdwood
parent 1358afacc9
commit 84befa2563
1 changed files with 2 additions and 1 deletions

View File

@ -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