Skip to content

Commit efd1031

Browse files
committed
llext: fix multi-core use cases
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 <[email protected]>
1 parent 6c36dd6 commit efd1031

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/library_manager/lib_manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ static void lib_manager_update_sof_ctx(void *base_addr, uint32_t lib_id)
464464
{
465465
struct ext_library *_ext_lib = ext_lib_get();
466466
/* Never freed, will panic if fails */
467-
struct lib_manager_mod_ctx *ctx = rzalloc(SOF_MEM_ZONE_SYS, 0, SOF_MEM_CAPS_RAM,
468-
sizeof(*ctx));
467+
struct lib_manager_mod_ctx *ctx = rzalloc(SOF_MEM_ZONE_SYS, SOF_MEM_FLAG_COHERENT,
468+
SOF_MEM_CAPS_RAM, sizeof(*ctx));
469469

470470
ctx->base_addr = base_addr;
471471

src/library_manager/llext_manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ uintptr_t llext_manager_allocate_module(struct processing_module *proc,
343343
size_t offset = (uintptr_t)mod_manifest - imr_rodata;
344344

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

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

0 commit comments

Comments
 (0)