dai: turn dai_get_device() into a syscall#10853
Open
kv2019i wants to merge 1 commit into
Open
Conversation
Make dai_get_device() a syscall, so it can be called from user-space threads. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Collaborator
Author
|
For context, part of #10558 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes dai_get_device() as a Zephyr syscall so it can be invoked from user-space threads, while keeping the actual implementation in kernel space (z_impl_dai_get_device()).
Changes:
- Added a Zephyr syscall verification/marshalling implementation for
dai_get_device(). - Renamed the existing implementation to
z_impl_dai_get_device()to match Zephyr syscall conventions. - Updated the DAI Zephyr header and Zephyr build system to declare/generate the syscall.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
zephyr/syscall/dai.c |
Adds z_vrfy_dai_get_device() verifier and includes generated marshalling code. |
zephyr/CMakeLists.txt |
Registers the syscall header for generation and adds the syscall C file to the Zephyr build. |
src/lib/dai.c |
Renames dai_get_device() implementation to z_impl_dai_get_device(). |
src/include/sof/lib/dai-zephyr.h |
Marks dai_get_device() as __syscall and includes the generated syscall header. |
Comment on lines
+625
to
+626
| zephyr_syscall_header(${SOF_SRC_PATH}/include/sof/lib/dai-zephyr.h) | ||
| zephyr_library_sources_ifdef(CONFIG_USERSPACE syscall/dai.c) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make dai_get_device() a syscall, so it can be called from user-space threads.