|
3 | 3 | * Copyright(c) 2017 Intel Corporation. All rights reserved. |
4 | 4 | * |
5 | 5 | * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> |
| 6 | + * Tomasz Lauda <tomasz.lauda@linux.intel.com> |
6 | 7 | */ |
7 | 8 |
|
8 | 9 | /** |
9 | 10 | * \file arch/xtensa/include/arch/schedule/task.h |
10 | 11 | * \brief Arch task header file |
11 | 12 | * \authors Liam Girdwood <liam.r.girdwood@linux.intel.com> |
| 13 | + * Tomasz Lauda <tomasz.lauda@linux.intel.com> |
12 | 14 | */ |
13 | 15 |
|
14 | 16 | #ifdef __SOF_SCHEDULE_TASK_H__ |
15 | 17 |
|
16 | 18 | #ifndef __ARCH_SCHEDULE_TASK_H__ |
17 | 19 | #define __ARCH_SCHEDULE_TASK_H__ |
18 | 20 |
|
19 | | -#include <sof/list.h> |
20 | | -#include <config.h> |
21 | | - |
22 | | -/** \brief IRQ task data. */ |
23 | | -struct irq_task { |
24 | | - struct list_item list; /**< list of tasks */ |
25 | | - int irq; /**< IRQ level */ |
26 | | -}; |
27 | | - |
28 | | -struct sof; |
29 | 21 | struct task; |
30 | 22 |
|
31 | | -#if CONFIG_SMP |
32 | | - |
33 | | -/** |
34 | | - * \brief Starts slave core main task. |
35 | | - * \param[in,out] sof Main context. |
36 | | - * \return Error code. |
37 | | - */ |
38 | | -int do_task_slave_core(struct sof *sof); |
39 | | - |
40 | | -#endif |
41 | | - |
42 | 23 | /** |
43 | | - * \brief Returns IRQ low task data. |
44 | | - * \return Pointer to pointer of IRQ low task data. |
| 24 | + * \brief Returns main task data. |
| 25 | + * \return Pointer to pointer of main task data. |
45 | 26 | */ |
46 | | -struct irq_task **task_irq_low_get(void); |
| 27 | +struct task **task_main_get(void); |
47 | 28 |
|
48 | 29 | /** |
49 | | - * \brief Returns IRQ medium task data. |
50 | | - * \return Pointer to pointer of IRQ medium task data. |
| 30 | + * \brief Returns current system context. |
51 | 31 | */ |
52 | | -struct irq_task **task_irq_med_get(void); |
| 32 | +volatile void *task_context_get(void); |
53 | 33 |
|
54 | 34 | /** |
55 | | - * \brief Returns IRQ high task data. |
56 | | - * \return Pointer to pointer of IRQ high task data. |
| 35 | + * \brief Switches system context. |
| 36 | + * \param[in,out] task Task context to be set. |
57 | 37 | */ |
58 | | -struct irq_task **task_irq_high_get(void); |
| 38 | +void task_context_set(void *task_ctx); |
59 | 39 |
|
60 | 40 | /** |
61 | | - * \brief Runs task. |
62 | | - * \param[in,out] task Task data. |
| 41 | + * \brief Initializes task context. |
| 42 | + * \param[in,out] task Task with context to be initialized. |
| 43 | + * \param[in,out] entry Entry point for task execution. |
63 | 44 | */ |
64 | | -int arch_run_task(struct task *task); |
| 45 | +int task_context_init(struct task *task, void *entry); |
65 | 46 |
|
66 | 47 | /** |
67 | | - * \brief Allocates IRQ tasks. |
| 48 | + * \brief Frees task context. |
| 49 | + * \param[in,out] task Task with context to be freed. |
68 | 50 | */ |
69 | | -int arch_allocate_tasks(void); |
| 51 | +void task_context_free(struct task *task); |
70 | 52 |
|
71 | 53 | /** |
72 | | - * \brief Frees IRQ tasks. |
| 54 | + * \brief Performs cache operation on task's context. |
| 55 | + * \param[in,out] task_ctx Context to be wtb/inv. |
| 56 | + * \param[in] cmd Cache operation to be performed. |
73 | 57 | */ |
74 | | -void arch_free_tasks(void); |
| 58 | +void task_context_cache(void *task_ctx, int cmd); |
75 | 59 |
|
76 | 60 | #endif /* __ARCH_SCHEDULE_TASK_H__ */ |
77 | 61 |
|
|
0 commit comments