Skip to content

userspace: a subset of #10945 that can be applied already now#11017

Merged
lgirdwood merged 3 commits into
thesofproject:mainfrom
lyakh:ull-misc
Jul 21, 2026
Merged

userspace: a subset of #10945 that can be applied already now#11017
lgirdwood merged 3 commits into
thesofproject:mainfrom
lyakh:ull-misc

Conversation

@lyakh

@lyakh lyakh commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

3 minor changes from #10945

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 ports a small subset of #10945 into the current tree, focusing on userspace-LL related safety checks and small refactors in the Zephyr scheduler integration.

Changes:

  • Add runtime assertions to prevent accessing kernel scheduler structures from user context (and to avoid calling certain helpers from the LL scheduler thread).
  • Tighten userspace-LL API boundaries in zephyr/schedule.c by clarifying and enforcing which getters are safe in which contexts.
  • Minor cleanup in zephyr_ll.c (remove redundant cast) while attempting to gate LL task-info helpers.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
zephyr/schedule.c Adds/adjusts assertions around scheduler getter functions to enforce privileged-context usage.
src/schedule/zephyr_ll.c Refactors LL scheduler task-info helpers (but currently introduces an incorrect compile-time guard).
src/audio/component.c Adds an assertion to prevent accessing the global component driver list from the LL scheduler thread context.

Comment thread src/schedule/zephyr_ll.c Outdated

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, except the opens by copilot which need resolved etc.

lyakh added 3 commits July 21, 2026 10:50
The global driver list should never be accessed from the audio
context. Add an assertion for that.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
scheduler_get_data_for_core() returns void pointer, no need to
type-cast it to other pointer types.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Both arch_schedulers_get() and arch_user_schedulers_get() should only
be called from the privileged context.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lgirdwood
lgirdwood merged commit 8c0c11b into thesofproject:main Jul 21, 2026
45 checks passed
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.

3 participants