zephyr: schedule: allow user-space to access scheduler list#10820
zephyr: schedule: allow user-space to access scheduler list#10820kv2019i wants to merge 1 commit into
Conversation
Make the scheduler list available to system user-space threads. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
|
For context, part of #10558 |
There was a problem hiding this comment.
Pull request overview
This PR makes the per-core scheduler list pointer array available to Zephyr “system user-space” threads by placing it into a user-accessible app memory partition.
Changes:
- Add Zephyr userspace helper include to access app-memory placement macros.
- Place the
_schedulersarray into thesysuser_partitionBSS viaAPP_SYSUSER_BSS.
| #include <rtos/userspace_helper.h> | ||
| #include <sof/lib/cpu.h> | ||
| #include <ipc/topology.h> | ||
|
|
||
| static struct schedulers *_schedulers[CONFIG_CORE_COUNT]; | ||
| static APP_SYSUSER_BSS struct schedulers *_schedulers[CONFIG_CORE_COUNT]; |
There was a problem hiding this comment.
are all schedulers going to run in userspace? E.g. we still have EDF and it's still used by, e.g. kpb. As long as the privileged mode uses this, seems rather risky to me to let userspace overwrite it.
There was a problem hiding this comment.
@lyakh That is the goal. This does leave a gap currently with EDF. Ideally, the SOF schedule.h will only handle audio application logic (how to schedule audio pipelines), while the lower level scheduling is moved to Zephyr. We do have some remaining work to do, especially with EDF used for IPC task.
Make the scheduler list available to system user-space threads.