diff --git a/src/arch/xtensa/configs/mt8196_defconfig b/src/arch/xtensa/configs/mt8196_defconfig index 1d9fffedfbd2..f030ddc4fe2f 100644 --- a/src/arch/xtensa/configs/mt8196_defconfig +++ b/src/arch/xtensa/configs/mt8196_defconfig @@ -13,3 +13,4 @@ CONFIG_COMP_KPB=n CONFIG_COMP_SEL=n CONFIG_COMP_ASRC=n CONFIG_DEBUG=y +CONFIG_SCHEDULE_LL_NO_RESCHEDULE_TASK=y diff --git a/src/schedule/Kconfig b/src/schedule/Kconfig index d7665aee3581..fc917c252809 100644 --- a/src/schedule/Kconfig +++ b/src/schedule/Kconfig @@ -41,3 +41,13 @@ config SCHEDULE_LL_STATS_LOG_WINDOW_SIZE Size of the statistics window as a power of two. The window size setting also impacts the rate of reporting. With 1ms scheduler tick, default of 10 results in 1024msec window size. + +config SCHEDULE_LL_NO_RESCHEDULE_TASK + bool "Low-latency scheduler skips task rescheduling" + default n + help + Select this to instantiate the low-latency scheduler without task + rescheduling, given that the operation is optional. Under such cases, + scheduler_ops::reschedule_task will set to NULL instead, tasks with + the attempt to reschedule (e.g. DMA trace works) will be relinguished + directly and return no error. diff --git a/src/schedule/ll_schedule.c b/src/schedule/ll_schedule.c index 8881fd7bd224..7f5d0bca526f 100644 --- a/src/schedule/ll_schedule.c +++ b/src/schedule/ll_schedule.c @@ -684,6 +684,11 @@ static int schedule_ll_task_cancel(void *data, struct task *task) return 0; } +#if CONFIG_SCHEDULE_LL_NO_RESCHEDULE_TASK +/* As a null function pointer */ +#define reschedule_ll_task ((void*)0) + +#else static int reschedule_ll_task(void *data, struct task *task, uint64_t start) { struct ll_schedule_data *sch = data; @@ -717,6 +722,7 @@ static int reschedule_ll_task(void *data, struct task *task, uint64_t start) return 0; } +#endif static void scheduler_free_ll(void *data, uint32_t flags) {