From 2ba9e7e275affa0b97c3d3b9bf9b6a4b43a8bf06 Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Fri, 17 Jul 2026 17:52:13 +0200 Subject: [PATCH] platform: ace: watchdog: send primary timeout via ipc_service critical send The primary-core watchdog timeout notification used the deprecated old-interface call intel_adsp_ipc_send_message_emergency() together with the Intel-specific INTEL_ADSP_IPC_HOST_DEV device handle. Route it instead through the generic ipc_platform_send_msg_direct(), which maps to ipc_service_send_critical() and the backend critical/emergency send, identical register behaviour (busy-wait, no ack, bypasses flow control), but expressed with the backend-agnostic ipc_service API and a struct ipc_msg, mirroring the secondary-core path. This removes the watchdog's dependency on the old interface and on the Intel host IPC device macro, dropping the intel_adsp_ipc*.h includes. Signed-off-by: Tomasz Leman --- src/platform/intel/ace/lib/watchdog.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/platform/intel/ace/lib/watchdog.c b/src/platform/intel/ace/lib/watchdog.c index a9efb2ae0b7e..95ff5e3c4c6b 100644 --- a/src/platform/intel/ace/lib/watchdog.c +++ b/src/platform/intel/ace/lib/watchdog.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -17,8 +18,6 @@ #if DT_NODE_HAS_STATUS(DT_NODELABEL(adsp_watchdog), okay) #include -#include -#include LOG_MODULE_REGISTER(wdt, CONFIG_SOF_LOG_LEVEL); @@ -27,6 +26,7 @@ SOF_DEFINE_REG_UUID(wdt); DECLARE_TR_CTX(wdt_tr, SOF_UUID(wdt_uuid), LOG_LEVEL_INFO); static const struct device *const watchdog = DEVICE_DT_GET(DT_NODELABEL(adsp_watchdog)); +static struct ipc_msg primary_timeout_ipc; static struct ipc_msg secondary_timeout_ipc; static void watchdog_primary_core_action_on_timeout(void) @@ -35,8 +35,15 @@ static void watchdog_primary_core_action_on_timeout(void) /* Send Watchdog Timeout IPC notification */ ipc4_notification_watchdog_init(¬if, cpu_get_id(), true); - intel_adsp_ipc_send_message_emergency(INTEL_ADSP_IPC_HOST_DEV, - notif.primary.dat, notif.extension.dat); + primary_timeout_ipc.header = notif.primary.dat; + primary_timeout_ipc.extension = notif.extension.dat; + + /* + * The primary core low latency scheduler is stalled, so bypass the IPC + * queue and push the notification straight to the host using the direct + * (critical) send path. + */ + ipc_platform_send_msg_direct(&primary_timeout_ipc); } static void watchdog_secondary_core_action_on_timeout(void) @@ -83,6 +90,10 @@ __cold void watchdog_init(void) assert_can_be_cold(); + primary_timeout_ipc.tx_data = NULL; + primary_timeout_ipc.tx_size = 0; + list_init(&primary_timeout_ipc.list); + secondary_timeout_ipc.tx_data = NULL; secondary_timeout_ipc.tx_size = 0; list_init(&secondary_timeout_ipc.list);