-
Notifications
You must be signed in to change notification settings - Fork 367
LL userspace ipc_msg_send() and send_resource_notif() syscalls and related changes #10725
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -297,4 +297,21 @@ void send_mixer_underrun_notif_msg(uint32_t resource_id, uint32_t eos_flag, uint | |
| uint32_t expected_data_mixed); | ||
| void ipc4_update_notification_mask(uint32_t ntfy_mask, uint32_t enabled_mask); | ||
|
|
||
| #ifdef CONFIG_SOF_USERSPACE_LL | ||
|
|
||
| __syscall bool send_resource_notif(uint32_t resource_id, uint32_t event_type, | ||
| uint32_t resource_type, void *data, uint32_t data_size); | ||
|
|
||
| bool z_impl_send_resource_notif(uint32_t resource_id, uint32_t event_type, | ||
| uint32_t resource_type, void *data, uint32_t data_size); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not needed |
||
|
|
||
| #include <zephyr/syscalls/notification.h> | ||
|
|
||
| #else | ||
|
|
||
| bool send_resource_notif(uint32_t resource_id, uint32_t event_type, | ||
| uint32_t resource_type, void *data, uint32_t data_size); | ||
|
|
||
| #endif /* CONFIG_SOF_USERSPACE_LL */ | ||
|
|
||
| #endif /* __IPC4_NOTIFICATION_H__ */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we really need this level of header granularity? |
||
| * | ||
| * Copyright(c) 2026 Intel Corporation. All rights reserved. | ||
| */ | ||
|
|
||
| #ifndef __SOF_IPC_IPC_MSG_LIST_REMOVE_H__ | ||
| #define __SOF_IPC_IPC_MSG_LIST_REMOVE_H__ | ||
|
|
||
| struct ipc_msg; | ||
|
|
||
| /** | ||
| * \brief Remove an IPC message from the send queue. | ||
| * | ||
| * Acquires the IPC lock and removes the message from its list. | ||
| * Safe to call from userspace. | ||
| * | ||
| * @param msg The IPC message to remove from the queue. | ||
| */ | ||
| #if defined(__ZEPHYR__) && defined(CONFIG_SOF_USERSPACE_LL) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's use the same condition as in other syscalls - |
||
| __syscall void ipc_msg_list_remove(struct ipc_msg *msg); | ||
| #else | ||
| void z_impl_ipc_msg_list_remove(struct ipc_msg *msg); | ||
| #define ipc_msg_list_remove z_impl_ipc_msg_list_remove | ||
| #endif | ||
|
|
||
| #if defined(__ZEPHYR__) && defined(CONFIG_SOF_USERSPACE_LL) | ||
| #include <zephyr/syscalls/ipc_msg_list_remove.h> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: this could be part of the first if branch as the condition is the same.. |
||
| #endif | ||
|
|
||
| #endif /* __SOF_IPC_IPC_MSG_LIST_REMOVE_H__ */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause | ||
| * | ||
| * Copyright(c) 2026 Intel Corporation. All rights reserved. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drop the all rights reserved. |
||
| */ | ||
|
|
||
| #ifndef __SOF_IPC_IPC_MSG_SEND_H__ | ||
| #define __SOF_IPC_IPC_MSG_SEND_H__ | ||
|
|
||
| #include <stdbool.h> | ||
|
|
||
| struct ipc_msg; | ||
|
|
||
| /** | ||
| * \brief Queues an IPC message for transmission. | ||
| * @param msg The IPC message. | ||
| * @param data The message data. | ||
| * @param high_priority True if a high priority message. | ||
| */ | ||
| #if defined(__ZEPHYR__) && defined(CONFIG_SOF_USERSPACE_LL) | ||
| __syscall void ipc_msg_send(struct ipc_msg *msg, void *data, | ||
| bool high_priority); | ||
| #else | ||
| void z_impl_ipc_msg_send(struct ipc_msg *msg, void *data, | ||
| bool high_priority); | ||
| #define ipc_msg_send z_impl_ipc_msg_send | ||
| #endif | ||
|
|
||
| #if defined(__ZEPHYR__) && defined(CONFIG_SOF_USERSPACE_LL) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto here |
||
| #include <zephyr/syscalls/ipc_msg_send.h> | ||
| #endif | ||
|
|
||
| #endif /* __SOF_IPC_IPC_MSG_SEND_H__ */ | ||
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.
let's use the same condition for all of these