Skip to content

dai: turn dai_get_device() into a syscall#10853

Open
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202606-dai-get-syscall
Open

dai: turn dai_get_device() into a syscall#10853
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202606-dai-get-syscall

Conversation

@kv2019i

@kv2019i kv2019i commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Make dai_get_device() a syscall, so it can be called from user-space threads.

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>
@kv2019i

kv2019i commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

For context, part of #10558

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread zephyr/CMakeLists.txt
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants