Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/include/sof/schedule/dp_schedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ static inline void scheduler_dp_check_deadline(uint16_t core, uint32_t deadline_
* memory is writable by the DP threads, so the calculation runs in the calling
* LL user thread, and only its results are passed to the kernel with
* scheduler_dp_kick(). Otherwise this calls scheduler_dp_ll_tick().
*
* @param[in] core Core ID of the calling LL scheduler.
*/
void scheduler_dp_ll_post_tick(void);
void scheduler_dp_ll_post_tick(unsigned int core);

#if CONFIG_SOF_BOOT_TEST_STANDALONE && CONFIG_SOF_USERSPACE_APPLICATION
/* Test hooks: add and remove kernel-only DP task records without a DP task */
Expand Down
11 changes: 7 additions & 4 deletions src/schedule/zephyr_dp_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ void scheduler_dp_unlock(unsigned int key)

#if CONFIG_SOF_USERSPACE_APPLICATION && CONFIG_SOF_USERSPACE_LL
/* Runs in the LL user thread, see scheduler_dp_ll_post_tick() documentation */
void scheduler_dp_ll_post_tick(void)
void scheduler_dp_ll_post_tick(unsigned int core)
{
struct scheduler_dp_data *dp_sch = scheduler_get_user_data(SOF_SCHEDULE_DP);
/* user context: the kernel-only lookup and cpu_get_id() are not usable */
struct scheduler_dp_data *dp_sch =
scheduler_list_get_data(*arch_user_schedulers_get_for_core(core),
SOF_SCHEDULE_DP);
unsigned int lock_key;

/*
Expand All @@ -64,12 +67,12 @@ void scheduler_dp_ll_post_tick(void)
if (!dp_sch || list_is_empty(&dp_sch->tasks))
return;

lock_key = scheduler_dp_lock(cpu_get_id());
lock_key = scheduler_dp_lock(core);
scheduler_dp_recalculate(dp_sch);
scheduler_dp_unlock(lock_key);
}
#else
void scheduler_dp_ll_post_tick(void)
void scheduler_dp_ll_post_tick(unsigned int core)
{
scheduler_dp_ll_tick();
}
Expand Down
2 changes: 1 addition & 1 deletion src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static void zephyr_ll_run(void *data)
zephyr_ll_unlock(sch, &flags);

#ifdef CONFIG_ZEPHYR_DP_SCHEDULER
scheduler_dp_ll_post_tick();
scheduler_dp_ll_post_tick(sch->core);
#endif
}

Expand Down
Loading