audio: pipeline-schedule: make pipeline_schedule_triggered() user safe#10993
Conversation
|
For context, related to #10558 |
There was a problem hiding this comment.
Pull request overview
This PR updates pipeline_schedule_triggered() to be callable from user-space builds by replacing the kernel-only IRQ critical section (irq_local_disable()/enable()) with the user-space LL scheduler lock (user_ll_lock_sched()/unlock_sched()) when CONFIG_SOF_USERSPACE_LL is enabled.
Changes:
- Add
CONFIG_SOF_USERSPACE_LLlocking path usinguser_ll_lock_sched()/user_ll_unlock_sched()around pipeline trigger scheduling. - Keep the existing IRQ-disable critical section for kernel-space builds.
| */ | ||
| int sched_core = ppl_data->start->ipc_config.core; | ||
|
|
||
| user_ll_lock_sched(sched_core); |
| int sched_core = ppl_data->start->ipc_config.core; | ||
|
|
||
| user_ll_lock_sched(sched_core); | ||
| #else |
There was a problem hiding this comment.
Minor improvement: If this comment describes the same issue that you would like to prevent in Uspace, I would just merge those comments and add a small remark that we use different synchronization primitives depending on USpace option. Otherwise looks good.
There was a problem hiding this comment.
Ack @wjablon1 did this in V2. The comments were too verbose -- combined them now.
Add support to run pipeline_schedule_triggered() in user-space. Use the user_ll_lock/unlock_sched() interface if building with CONFIG_SOF_USERSPACE_LL. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
10b7a8f to
e742825
Compare
|
V2 pushed:
|
Add support to run pipeline_schedule_triggered() in user-space. Use the user_ll_lock/unlock_sched() interface if building with CONFIG_SOF_USERSPACE_LL.