-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib_manager: modules: Fix missing call to modules_free #8935
Conversation
12acc7a
to
33b5408
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the end result, that modules.c is no longer needed for native modules. Need to test this with LLEXT (and add a CI LLEXT test...)
src/library_manager/lib_manager.c
Outdated
build_info->api_version_number.full == SOF_MODULE_API_CURRENT_VERSION) { | ||
/* Use lib_manager shim functions */ | ||
drv->ops.create = &lib_manager_module_create; | ||
drv->ops.free = &lib_manager_module_free; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do I understand it correctly, that after this change modules.c will only be used for IADK? That would actually be good indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By design IADK modules are inheriting interface from native loadable modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modules.c
(part of the Processing Module Adapter) was supposed to be responsible only for calling C++ functions related to IADK modules. After this change it is no longer used by other module types.
33b5408
to
d37d689
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested, unfortunately this breaks llext
2b7ee8e
to
37fa62d
Compare
37fa62d
to
a0c60a3
Compare
@lyakh Can you check do it still breaks llext? |
@softwarecki why do you think it's fixed now? What's been changed compared to that version? I compared and I don't see any changes that would fix it. |
a0c60a3
to
68a9897
Compare
@lyakh The module entry is taken from a module manifest. This code path has not been changed ( |
@softwarecki I'm talking about |
@softwarecki ...and sorry for a delay - that comment was sitting in my browser for days, I must've forgotten to press "comment" :-( |
@lyakh The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 nitpicks - let's fix in a follow-up
@softwarecki ah, you're right, now I get it! And tested - worked in a short test. It looks good in general, but a double-use test just has caused a DSP panic with this PR - investigating, removing the approval for now |
a more thorough test caused a DSP panic, removing the approval temporarily
@softwarecki please merge this diff with your "lib_manager: modules: move native lib support to lib_manager" (and also add a description, it certainly deserves one) |
68a9897
to
fa58e36
Compare
Rebased and applied @lyakh patch. |
@softwarecki @kv2019i @lgirdwood can we merge this one instead of #8974 - the first 3 commits are identical and the fourth one looks good to me too |
Sorry @lyakh , I was too quick with #8974. @softwarecki can you update this and we can merge this as well? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e27ea44
to
b96b913
Compare
Moved module type identification to lib_manager. Since llext modules place the buildinfo structure in a separate section, API version verification has been moved to llext_manager. Thanks to these changes, the Processing Module Adapter is used only by IADK modules as intended. This commit also fixes an issue with the modules_free function not being called for native modules. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
b96b913
to
9ab785a
Compare
@softwarecki @wszypelt good to merge or real issue reported by CI ? |
@lgirdwood I'm afraid that the PR may contain a sporadic issue, I'm taking this PR for full scope tests, I should have the results tomorrow :) |
@lgirdwood @softwarecki After careful checking, I don't see any problems, CI also passed correctly |
This PR addresses an issue with non-iadk loadable modules for which the
modules_free
function is not called.For some of following commits I already prepared PRs - pending review.
d37d689 modules: Remove unused module_entry_point from module_data87f5e3e module_adapter: modules: Remove unused sys_service pointer
c951d57 module/base: modules: Remove module_adapter from module_data
c85d872 modules: Remove unused buffers
2b49f99 modules: Remove unnecessary functions from Processing Module Adapter
Actual PR content:
e27ea44 lib_manager: modules: move native lib support to lib_manager
lib_manager: Add lib_manager_get_module_manifest function #8974:
94b9976 lib_manager: Rename lib_manager_get_library_module_desc functionca42dff lib_manager: Add lib_manager_get_module_manifest function
11d8a42 ipc4/helper: ipc4_get_comp_drv: Change parameter type to uint32_t
lib_manager: llext_manager: Add const to variables and function parameters cleanup #8898:
efd957d llext_manager: Remove unused desc parameter7407ecd lib_manager: llext_manager: Add const to module allocate functions
66f35c9 FIX lib_manager: llext_manager: Add const modifier to module manifest pointers
61e877f lib_manager: llext_manager: Add const modifier to module manifest pointers
30fd9df lib_manager: llext_manager: Simplifying parameter list for free module
5c6c7c8 lib_manager: Simplifying parameter list for lib_manager_register_module
0e05cef lib_manager: Verify preload_page_count from module manifest
da99651 lib_manager: Add const to library manifest variable
component: module_adapter: Move module_interface pointer to comp_driver #8905:
3d34605 modules: lib_manager: Move declare_dynamic_module_adapter to lib_manager6e80e8b component: module_adapter: Move module_interface pointer to comp_driver