Uh oh!
There was an error while loading. Please reload this page.
Only heap size attribute - #10842
Conversation
There was a problem hiding this comment.
Pull request overview
This PR consolidates module allocation helpers into the RTOS allocation headers and simplifies IPC4 DP/pipeline “memory requirement” attributes to a single heap size field, aiming to prevent interim/lifetime/shared attribute proliferation ahead of the next SOF release (and in preparation for follow-up vregion work referenced in the PR description).
Changes:
- Move
mod_alloc_ctx+sof_ctx_{alloc,zalloc,free}()API intortos/alloc.h(Zephyr + POSIX) and deletesrc/include/sof/ctx_alloc.h. - Simplify IPC4 DP/pipeline memory requirement structs to use only
heap_bytesand update related decode logging. - Adjust
vregion.hstubs for!CONFIG_SOF_VREGIONSto no longer allocate/free a dummystruct vregionand to returnNULLfor vregion ops.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| zephyr/include/rtos/alloc.h | Adds mod_alloc_ctx and sof_ctx_* helpers (with vregion support) directly in RTOS alloc header. |
| posix/include/rtos/alloc.h | Adds POSIX “heap-only” mod_alloc_ctx and sof_ctx_* helpers for API parity. |
| src/include/sof/lib/vregion.h | Simplifies non-vregions stubs (no dummy allocation; vregion ops return NULL). |
| src/include/sof/lib/dai-zephyr.h | Removes now-deleted sof/ctx_alloc.h include. |
| src/include/sof/audio/component.h | Removes now-deleted sof/ctx_alloc.h include. |
| src/include/sof/ctx_alloc.h | Deletes the standalone ctx allocation header (API moved to rtos/alloc.h). |
| src/include/ipc4/pipeline.h | Replaces interim/lifetime/shared fields with heap_bytes in IPC4 pipeline mem data. |
| src/include/ipc4/module.h | Replaces interim/lifetime/shared fields with heap_bytes in IPC4 DP mem data. |
| src/ipc/ipc4/helper.c | Updates IPC4 pipeline ext object decode log to match heap_bytes. |
| src/audio/module_adapter/module_adapter_ipc4.c | Updates IPC4 module ext init decode log to match heap_bytes. |
| src/audio/module_adapter/module/generic.c | Drops sof/ctx_alloc.h include (uses moved API). |
| src/audio/buffers/ring_buffer.c | Drops sof/ctx_alloc.h include (uses moved API). |
| src/audio/buffers/comp_buffer.c | Drops sof/ctx_alloc.h include (uses moved API). |
| struct k_heap *sof_sys_heap_get(void); | ||
| struct k_heap *sof_sys_user_heap_get(void); | ||
| /* Posix version of struct mod_alloc_ctx without vregion support */ |
c00d82c to
c3abdd3Comparejsarha
commented
Jun 4, 2026
There really is no reason to keep the [DNM] tag. This is really only back stepping one unnecessary change that has not been released in any SOF release. |
lyakh
commented
Jun 5, 2026
Simplify the IPC4 memory data structs by replacing separate interim_heap_bytes, lifetime_heap_bytes, and shared_bytes fields with a single heap_bytes field, matching the Linux driver side changes. Affects both ipc4_module_init_ext_obj_dp_data and ipc4_pipeline_ext_obj_mem_data structs, and their corresponding log messages. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
c3abdd3 to
4cbbf9cComparejsarha
commented
Jun 8, 2026
Rebased. |
lgirdwood
commented
Jun 8, 2026
@jsarha can you check CI, thanks ! |
jsarha
commented
Jun 8, 2026
SOFCI TEST |
Uh oh!
There was an error while loading. Please reload this page.
This PR is base on #10831 and should go in after it. It is also an integral part of soon to be pushed new version #10783 and should go in only after we are convinced of #10783 changes, automating division between vregion lifetime and interim allocations, and in effect moving most of allocations to lifetime linear part of the vregion heap.
This is a separate PR because this should go in before we tag the next SOF release, to not to let our IPC and topology attribute wandering to contaminate our SOF releases. That is if we get convinced of #10783 approach.
This is a pair with the soon to be pushed new version of thesofproject/linux#5537