From 9d8603834233d87f5c3286c87238d9e19b28a245 Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Fri, 28 Aug 2026 12:03:26 +0300 Subject: [PATCH] llext: Allow multiple DP instances of same module The LL userspace changes broke support of multiple instances of same DP module. This is a quick remedy to fix that. The fix has a down side that it does not allow having both LL and DP instances of the same module within a same configuration. Signed-off-by: Jyri Sarha --- src/library_manager/llext_manager.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/library_manager/llext_manager.c b/src/library_manager/llext_manager.c index 4ad3c55d55bc..c2a8f47d31d6 100644 --- a/src/library_manager/llext_manager.c +++ b/src/library_manager/llext_manager.c @@ -843,9 +843,15 @@ static int llext_manager_add_mod_domain(struct lib_manager_module *mctx, struct /* * Add to domain on first load: for "normal" modules use_count == 1, - * for dependencies use_count == 2 and n_dependent == 1 + * for dependencies use_count == 2 and n_dependent == 1. + * This does not apply to DP modules, since they are, for now, + * all in their own memory domains. + * + * NOTE: This approach will make it impossible for a single + * module to have both LL and DP instances within one + * configuration. This will be fixed in the future. */ - if (ext->use_count > 1 && mctx->n_dependent != 1) + if (!mctx->domain_dp && ext->use_count > 1 && mctx->n_dependent != 1) return 0; int ret = llext_manager_add_partition(domain, va_base_text, text_size,