Skip to content

Commit ffd2416

Browse files
committed
ipc4: add counter to mtrace buffer status notification
Increment a dedicated counter on each SOF_IPC4_NOTIFY_LOG_BUFFER_STATUS notification and place the current value in the IPC extension field, so the host side can distinguish consecutive mtrace notifications. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 89b2177 commit ffd2416

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ipc/ipc4/handler.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,8 @@ __cold void ipc_send_panic_notification(void)
16411641

16421642
#ifdef CONFIG_LOG_BACKEND_ADSP_MTRACE
16431643

1644+
static atomic_t mtrace_notify_counter;
1645+
16441646
static bool is_notification_queued(struct ipc_msg *msg)
16451647
{
16461648
struct ipc *ipc = ipc_get();
@@ -1663,7 +1665,8 @@ void ipc_send_buffer_status_notify(void)
16631665
return;
16641666

16651667
msg_notify.header = SOF_IPC4_NOTIF_HEADER(SOF_IPC4_NOTIFY_LOG_BUFFER_STATUS);
1666-
msg_notify.extension = 0;
1668+
atomic_add(&mtrace_notify_counter, 1);
1669+
msg_notify.extension = atomic_read(&mtrace_notify_counter);
16671670
msg_notify.tx_size = 0;
16681671

16691672
tr_dbg(&ipc_tr, "tx-notify\t: %#x|%#x", msg_notify.header, msg_notify.extension);

0 commit comments

Comments
 (0)