subset of #10945#10984
Open
lyakh wants to merge 7 commits into
Open
Conversation
set_processing_mode() and get_processing_mode() methods of struct module_interface aren't unused, they are used by IADK. Fix respective comments. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
scheduler_is_user() should return true for DP as well. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
schedule_free() is only called from testbench and stand-alone ztest. Remove it and all scheduler .scheduler_free() methods for all other builds. Also fix memory leaks in the Zephyr LL version. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When running the LL scheduler in userspace, it can happen that no kernel-mode schedulers get registered on a running secondary core. To recognise such cases add a check for userspace schedulers to check_restore(). Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Make ll_sch_is_current() available for builds with CONFIG_COLD_STORE_EXECUTE_DEBUG unselected. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When LL runs in userspace, multiple DP functions are called in userspace mode too. They cannot use privileged instructions then. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The LL tick task's .priv_data pointer has to be NULL for the check in zephyr_ll_task_init() to pass. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR cherry-picks a subset of changes from #10945 to unblock parts of the userspace scheduling work (Zephyr LL/DP scheduling and related init/teardown paths), including DP scheduler multicore fixes and conditional scheduler teardown helpers for standalone/library environments.
Changes:
- Adjust scheduling infrastructure for userspace-managed schedulers (mark DP as userspace-managed; update secondary-core restore check to consider user scheduler lists).
- Fix DP scheduler locking to use the task’s target core, and harden DP init state for repeated init scenarios.
- Gate
scheduler_freesupport behindCONFIG_SOF_BOOT_TEST_STANDALONE || CONFIG_LIBRARYacross multiple scheduler implementations.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| zephyr/include/sof/lib/memory.h | Reorders cold-store debug include block relative to Zephyr-only ll_sch_is_current() declaration. |
| src/schedule/zephyr_ll.c | Adds conditional scheduler_free implementation and wires it into ops only for standalone/library builds. |
| src/schedule/zephyr_dp_schedule.c | Uses task->core for per-core DP locking; initializes ll_tick_src.priv_data. |
| src/schedule/schedule.c | Treats DP scheduler type as “userspace-managed” when userspace LL is enabled. |
| src/schedule/ll_schedule_xtos.c | Conditionally exposes LL scheduler_free in ops for standalone/library builds. |
| src/platform/library/schedule/ll_schedule.c | Conditionally exposes library LL scheduler_free in ops for standalone/library builds. |
| src/platform/library/schedule/edf_schedule.c | Conditionally exposes library EDF scheduler_free in ops for standalone/library builds. |
| src/init/init.c | Restore detection now accepts either kernel schedulers or user schedulers as “already allocated”. |
| src/include/sof/schedule/schedule.h | Conditionally compiles scheduler_free API/inline wrapper for standalone/library builds. |
| src/include/module/module/interface.h | Updates comments on processing-mode hooks. |
| * kernel | ||
| */ | ||
| return type == SOF_SCHEDULE_LL_TIMER; | ||
| return type == SOF_SCHEDULE_LL_TIMER || type == SOF_SCHEDULE_DP; |
Comment on lines
145
to
146
| * Frees scheduler's resources. | ||
| * @param data Private data of selected scheduler. |
Member
|
@lyakh some build errors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several commits from #10945 that can be merged now