From 0bf97793831f72df628c7951af68184f49da3105 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Thu, 9 Jan 2025 15:52:18 +0200 Subject: [PATCH] ipc: move delayed IPC sending to the primary core Low level IPC processing should be confined to the primary core. Move delayed IPC sending to a dedicated work queue with core 0 affinity. Fixes: #8165 Signed-off-by: Guennadi Liakhovetski --- src/ipc/ipc-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ipc/ipc-common.c b/src/ipc/ipc-common.c index e9de1efdd2a0..04bb8aef310d 100644 --- a/src/ipc/ipc-common.c +++ b/src/ipc/ipc-common.c @@ -179,7 +179,7 @@ static void schedule_ipc_worker(void) #ifdef __ZEPHYR__ struct ipc *ipc = ipc_get(); - k_work_schedule(&ipc->z_delayed_work, K_USEC(IPC_PERIOD_USEC)); + sof_primary_wq_reschedule(&ipc->z_delayed_work, K_USEC(IPC_PERIOD_USEC)); #endif } @@ -305,6 +305,8 @@ int ipc_init(struct sof *sof) #endif #ifdef __ZEPHYR__ + sof_primary_wq_init(); + k_work_init_delayable(&sof->ipc->z_delayed_work, ipc_work_handler); #endif