From 29abc8adc02528b589feb338de0f39e1b5f0ca94 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Thu, 1 Apr 2021 17:05:41 +0200 Subject: [PATCH] xtensa: fix booting secondary cores on the dummy thread When secondary cores are booted, they use the dummy thread and the IRQ stack until they switch over to a real thread. Therefore dummy threads shouldn't be skipped when cohering outgoing thread stack, only threads with zero stack size should be skipped. Signed-off-by: Guennadi Liakhovetski --- arch/xtensa/include/kernel_arch_func.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/include/kernel_arch_func.h b/arch/xtensa/include/kernel_arch_func.h index b69f951adce..061b6a480eb 100644 --- a/arch/xtensa/include/kernel_arch_func.h +++ b/arch/xtensa/include/kernel_arch_func.h @@ -111,7 +111,7 @@ static ALWAYS_INLINE void arch_cohere_stacks(struct k_thread *old_thread, /* Dummy threads appear at system initialization, but don't * have stack_info data and will never be saved. Ignore. */ - if (old_thread->base.thread_state & _THREAD_DUMMY) { + if (!osz) { return; }