Commit Graph

15 Commits

Author SHA1 Message Date
Fabio Baltieri f78d759f89 zephyr: edf-schedule: fix CONTAINER_OF type
The z_delayed_work field in struct task is a delayed work, so to go from
k_work to it safely there's an extra step. Add a
k_work_delayable_from_work to fix that.

This is harmless right now because k_work is the first field in
k_work_delayable but the extra step is the safe way of doing it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-31 22:14:37 +03:00
Guennadi Liakhovetski 5a090a68cb schedule: remove schedule_task_complete()
schedule_task_complete() is never used, remove it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-06 12:14:14 +00:00
Guennadi Liakhovetski 1b934e9d6c IDC: set IDC task priority equal to that of the IPC task
One of the functions of the IDC thread is to execute IPCs on
secondary cores, those have to be executed with the same priority as
when they're run on the primary core, i.e. with the priority of the
IPC thread. Set IDC thread priority equal to the IPC thread.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-01 15:30:05 +00:00
Laurentiu Mihalcea 0a5c049ac0 Switch to using rtos/task.h instead of sof/schedule/task.h
The purpose of this commit is to separate XTOS-specific code
from the Zephyr-specific code found in sof/schedule/task.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Guennadi Liakhovetski 1d6fae0f65 zephyr: edf-schedule: (cosmetic) make two variables static
EDF work queue related variables can be static.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-10-03 12:23:39 +03:00
Liam Girdwood c3c94fc515 header: rtos: use rtos specific version of wait.h
Code can now include <rtos/wait.h> and uses native Zephyr 64
cycle API instead of SOF version.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-09-06 15:37:21 +01:00
Kai Vehmanen 4abda50153 zephyr: edf_schedule: add support for repeating EDF tasks
Extend the EDF scheduler adaptation to Zephyr to allow repeating
tasks. This allows SOF code to use the per core threads used by
EDF for more usages.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-31 10:33:46 +01:00
Anas Nashif 33112b74e8 zephyr: use zephyr prefix for includes
Zephyr includes are now under a zephyr namespace, so use this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-18 14:22:01 +01:00
Guennadi Liakhovetski e38b07db97 zephyr: (cosmetic) fix indentation
Fix indentation in edf_schedule.c

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-09-07 13:34:31 +01:00
Guennadi Liakhovetski 56cb4f08f6 schedule: (cosmetic) remove three redundant variable initialisations
Remove redundant ret initialisation in two versions of
schedule_task_init_edf() and in schedule_task_init_ll().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-24 11:17:22 +01:00
Guennadi Liakhovetski beb7d7f93c zephyr: fix schedule_edf_task_cancel() return value
schedule_edf_task_cancel() should return 0 or an error code, whereas
k_work_cancel_delayable() returns flags, depending on the state of
the task being cancelled. Return value of schedule_task_cancel()
is never checked so this bug had no negative effect on SOF.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-10 15:05:40 +01:00
Anas Nashif 1c805dbec9 zephyr: move to new workq APIs
Convert remaining work queue APIs and remove to be deprecated calls.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-10 15:05:40 +01:00
Guennadi Liakhovetski b406ca1ae8 zephyr: make timer-domain and EDF threads per-core
When running on Zephyr, timer domain and EDF scheduling is
implemented by per-core work queues. Make sure they only run
on designated cores.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-05 11:03:35 +01:00
Guennadi Liakhovetski 047f08f20e uuid: use a pointer instead of casting it to an integer
UUID objects are represented by struct sof_uuid_entry instances in SOF.
Instead of casting pointers to them to integers for passing around,
carry them as pointers until they have to be cast to integers for
packing into data structures. This also fixes printing UUID, using a
"%pU" format.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-15 09:33:29 +01:00
Liam Girdwood 4b2edf8eed zephyr: wrapper: complete zephyr support for working audio
This patch finalises the wrapper to allow LL scheduling of
timer domain audio, EDF sccheduling of IPC, trace re-direction
and kconfig build support.

There are still many items that are WIP and have been marked with
TODO: comments.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-08-14 15:07:34 +01:00