Repository navigation
IPC4: mtrace fixes - #6260
Merged
Merged
IPC4: mtrace fixes#6260
Conversation
kv2019i
requested review from
dbaluta,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
September 6, 2022 09:43
lgirdwood
reviewed
Sep 6, 2022
ujfalusi
reviewed
Sep 6, 2022
kv2019i
force-pushed
the
topic/ipc4-mtrace-fixes
branch
from
September 6, 2022 12:48
959b4a3 to
5ac0dca
Compare
kv2019i
requested review from
abonislawski,
dbaluta,
lbetlej,
mmaka1,
pjdobrowolski and
plbossart
September 6, 2022 12:50
Collaborator
Author
|
@lgirdwood Still fails the Intel CI -> https://sof-ci.01.org/sof-pr-viewer/#/build/PR6260/build10303378 The multicore tests actually pass now on TGL-HDA target (these failed with #6243). |
Member
kv2019i
force-pushed
the
topic/ipc4-mtrace-fixes
branch
from
September 6, 2022 17:06
5ac0dca to
69ca779
Compare
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>
Collaborator
Author
|
V2 update:
|
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
approved these changes
Sep 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.