Repository navigation
audio: kpb: allocate component data from coherent memory - #11328
Merged
lgirdwood merged 1 commit intoOct 22, 2026
Merged
Conversation
struct comp_data embeds the draining task, whose Zephyr EDF implementation uses a struct k_work_delayable, and a struct k_mutex. Both are kernel objects and, with CONFIG_KERNEL_COHERENCE, must live in coherent memory. The structure was allocated with SOF_MEM_FLAG_USER only, i.e. from cached memory. This goes unnoticed as long as the draining task is rescheduled with no delay. Once draining in sync mode reschedules the task with a non-zero timeout, z_add_timeout() hits the sys_cache_is_mem_coherent() assertion and the DSP panics in the EDF work queue thread. Allocate the component data with SOF_MEM_FLAG_COHERENT. The history buffer is allocated separately and stays cached. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
serhiy-katsyuba-intel
requested review from
fkwasowi and
iganakov
as code owners
October 21, 2026 14:33
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused allocation change satisfies the embedded kernel objects’ coherence requirements without changing history-buffer allocation or cleanup.
No open issues 🎉
What changed in this PR
Allocates KPB component data in coherent memory to prevent DSP panics when the embedded draining task is rescheduled with a delay.
Changes:
- Adds
SOF_MEM_FLAG_COHERENTwhile retainingSOF_MEM_FLAG_USER. - Documents the kernel-object coherence requirement; history-buffer allocation remains unchanged.
| File | Description |
|---|---|
| src/audio/kpb.c | Allocates component data containing kernel objects in coherent memory. |
Review effort: Balanced
serhiy-katsyuba-intel
requested review from
abonislawski,
kv2019i and
lgirdwood
October 21, 2026 14:42
lgirdwood
approved these changes
Oct 21, 2026
PR 11328: test resultsRun date: 2026-10-21 15:52 UTC Tested commit: d44a98b455f75b1997b8a973053d18cb42dcdbbc |
abonislawski
approved these changes
Oct 22, 2026
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.
struct comp_data embeds the draining task, whose Zephyr EDF implementation uses a struct k_work_delayable, and a struct k_mutex. Both are kernel objects and, with CONFIG_KERNEL_COHERENCE, must live in coherent memory. The structure was allocated with SOF_MEM_FLAG_USER only, i.e. from cached memory.
This goes unnoticed as long as the draining task is rescheduled with no delay. Once draining in sync mode reschedules the task with a non-zero timeout, z_add_timeout() hits the sys_cache_is_mem_coherent() assertion and the DSP panics in the EDF work queue thread.
Allocate the component data with SOF_MEM_FLAG_COHERENT. The history buffer is allocated separately and stays cached.