Skip to content

Commit

Permalink
llext: fix multi-core use cases
Browse files Browse the repository at this point in the history
MOD_INIT_INSTANCE IPCs can be processed on different cores, different
cores can use the same modules. Make shared data uncached.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh committed Sep 4, 2024
1 parent ff57b79 commit 744854b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/library_manager/lib_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ static void lib_manager_update_sof_ctx(void *base_addr, uint32_t lib_id)
{
struct ext_library *_ext_lib = ext_lib_get();
/* Never freed, will panic if fails */
struct lib_manager_mod_ctx *ctx = rzalloc(SOF_MEM_ZONE_SYS, 0, SOF_MEM_CAPS_RAM,
sizeof(*ctx));
struct lib_manager_mod_ctx *ctx = rzalloc(SOF_MEM_ZONE_SYS, SOF_MEM_FLAG_COHERENT,
SOF_MEM_CAPS_RAM, sizeof(*ctx));

ctx->base_addr = base_addr;

Expand Down
4 changes: 2 additions & 2 deletions src/library_manager/llext_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ uintptr_t llext_manager_allocate_module(struct processing_module *proc,
size_t offset = (uintptr_t)mod_manifest - imr_rodata;

/* ctx->mod_manifest points to an array of module manifests */
ctx->mod_manifest = (const struct sof_man_module_manifest *)(va_rodata_base +
offset);
ctx->mod_manifest = sys_cache_uncached_ptr_get((__sparse_force void __sparse_cache *)
(va_rodata_base + offset));
}

return ctx->mod_manifest[entry_index].module.entry_point;
Expand Down

0 comments on commit 744854b

Please sign in to comment.