diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index 768dc5192..86a6169a6 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -28,12 +28,8 @@ extern K_KERNEL_STACK_ARRAY_DEFINE(z_interrupt_stacks, CONFIG_MP_MAX_NUM_CPUS, CONFIG_ISR_STACK_SIZE); -static atomic_t ready_flag; - static void secondary_init(void *arg) { - atomic_set(&ready_flag, 1); - secondary_core_init(sof_get()); } @@ -86,13 +82,8 @@ void cpu_notify_state_exit(enum pm_state state) { if (state == PM_STATE_SOFT_OFF) { #if CONFIG_MULTICORE - if (!cpu_is_primary(arch_proc_id())) { - /* Notifying primary core that secondary core successfully exit the D3 - * state and is back in the Idle thread. - */ - atomic_set(&ready_flag, 1); + if (!cpu_is_primary(arch_proc_id())) return; - } #endif #ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE @@ -132,16 +123,11 @@ int cpu_enable_core(int id) cpu_resume = false; #endif - atomic_clear(&ready_flag); - if (cpu_resume) - k_smp_cpu_resume(id, secondary_init, NULL, true); + k_smp_cpu_resume(id, secondary_init, NULL); else k_smp_cpu_start(id, secondary_init, NULL); - while (!atomic_get(&ready_flag)) - k_busy_wait(100); - return 0; }