forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 132
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
[DNM][POC] asoc: sof: add a hard-coded array of loadable extensions #5156
Draft
lyakh
wants to merge
1
commit into
thesofproject:topic/sof-dev
Choose a base branch
from
lyakh:llext
base: topic/sof-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't know what 'auxiliary loadable objects' are, but I don't think we can hard-code such GUIDs either. Those are likely vendor and implementation-specific, it's hard to imagine why they would need to be listed in the common parts of SOF.
Is it not possible to extend the topology to make references to such objects and load them in a more transparent way?
Also the commit title prefix should be ASoC: SOF:
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.
This is just a PoC, not even an RFC. I just needed a way to load those dependency modules to test my firmware (SOF and Zephyr) code. @plbossart @ujfalusi Please suggest a suitable way for doing this, my preference so far would be dependencies in manifests. Something like
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.
No, we are not going to hardcode UUIDs in kernel, it is not going to scale and just introduce unmanageable dependency mess.
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.
@lyakh, we can only load libraries into firmware, a library can contain several modules and all of them is sent to firmware for loading.
You should be bundling the dependent modules together in a library package and the firmware will load each modules from that library.
This is already supported by kernel and afaik the firmware's library manager code also handles this.
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.
@ujfalusi correct, that's why I proposed to add dependencies in module manifests, i.e. in the firmware
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.
@ujfalusi yes, this is also a possibility, but I like it less because:
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.
it is NOT implemented for LLEXT
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.
The module dependency handling is NOT implemented in kernel (nor there is any design document to follow on it) ;)
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.
@ujfalusi exactly, so we have a choice - either adding library loading support to LLEXT with the drawbacks that I've described above, or we add dependency loading support to the SOF kernel driver. Also note, that the multi-module library API wasn't designed to handle multiple copies of modules (AFAIK), in fact it might even check and complain / bail out
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.
May I suggest a one pager documentation on what an LLEXT module is, what it brings and how it should be managed?
It seems we are building layers upon layers without a clear vision of what the entire edifice will look like or what purpose it serves.