Skip to content

IPC4: mtrace fixes - #6260

Merged
lgirdwood merged 4 commits into
thesofproject:mainfrom
kv2019i:topic/ipc4-mtrace-fixes
Sep 6, 2022
Merged

lgirdwood merged 4 commits into
thesofproject:mainfrom
kv2019i:topic/ipc4-mtrace-fixes

Conversation

@kv2019i

@kv2019i kv2019i commented Sep 6, 2022 •

Copy link
Copy Markdown
Collaborator

Subset of #6243 with fixes that only affect IPC4 and Zephyr builds. If CI is clean, this can go in first and I'll rebase 6243 once the issues with XTOS is solved.

Comment thread src/ipc/ipc4/handler.c Resolved
Comment thread src/ipc/ipc4/handler.c Resolved
@kv2019i

kv2019i commented Sep 6, 2022

Copy link
Copy Markdown
Collaborator Author

@lgirdwood Still fails the Intel CI -> https://sof-ci.01.org/sof-pr-viewer/#/build/PR6260/build10303378
"No module named 'requests_kerberos'" from the python test script.

The multicore tests actually pass now on TGL-HDA target (these failed with #6243).

@lgirdwood

Copy link
Copy Markdown
Member

@wszypelt @lrudyX can you check the CI, not expecting a Kerberos error with this PR. Thanks !

Fix incorrect usage of k_uptime_delta() that leads to incorrect
decisions when to send the BUFFER_NOTIFY IPC.

k_uptime_delta() not only calculates the delta, but also stores the
current uptime to the argument passed as reftime. This breaks the logic
in code as mtrace_notify_last_sent was updated unintentionally.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
If something unexpected happens and logging subsystem is flooded
with messages, do not make the matter worse by flooding the host
with IPCs. This implements a lower threshold for how often
notifications can be sent to host.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
ipc_send_buffer_status_notify() uses a static ipc_msg object
to send the notifications. In normal circumstances, notifications
are never queued as they are sent as high-priority messages,
but this is still possible. Requeing the same object can potentially
lead to memory corruption as the caller is modifying the message
object, while it may in fact be in use still.

To avoid this, check in ipc_send_buffer_status_notify() whether
the IPC message queue has the notify object, and if yes, skip
the message. The buffer status notifications can be safely dropped
in error case, as host can read the log buffer status directly from
the SRAM window.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The list fields in the ipc_msg objects used by IPC4 stack, are not
initialized properly. This breaks the queueing logic in ipc_msg_send()
when it checks for "if (list_is_empty(&msg->list))". As a result,
if a IPC could not be sent immediately as the driver is busy, it would
not properly be resent later.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i

kv2019i commented Sep 6, 2022

Copy link
Copy Markdown
Collaborator Author

V2 update:

@kv2019i

kv2019i commented Sep 6, 2022

Copy link
Copy Markdown
Collaborator Author

@lgirdwood Ok, now it passed the CI check as well. Only one fail and that's a verify_kernel log fail that seems completely unrelated ("● org.gnome.Shell@x11.service loaded failed failed GNOME Shell on X11").

@lgirdwood
lgirdwood merged commit 1912eb8 into thesofproject:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants