-
Notifications
You must be signed in to change notification settings - Fork 349
[Do Not Review] Secondary core tearing down series #4718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,7 +246,7 @@ int platform_idc_init(void) | |
| /** | ||
| * \brief Frees IDC data and unregisters interrupt. | ||
| */ | ||
| void idc_free(void) | ||
| void platform_idc_free(void) | ||
|
||
| { | ||
| struct idc *idc = *idc_get(); | ||
| int core = cpu_get_id(); | ||
|
|
@@ -265,6 +265,4 @@ void idc_free(void) | |
| if (idctfc & IPC_IDCTFC_BUSY) | ||
| idc_write(IPC_IDCTFC(i), core, idctfc); | ||
| } | ||
|
|
||
| schedule_task_free(&idc->idc_task); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -272,7 +272,7 @@ static inline int schedule_task_free(struct task *task) | |
| return -ENODEV; | ||
| } | ||
|
|
||
| /** See scheduler_ops::scheduler_free */ | ||
| /** See scheduler_ops::scheduler_free, free all schedulers belong to the core */ | ||
| static inline void schedule_free(void) | ||
| { | ||
| struct schedulers *schedulers = *arch_schedulers_get(); | ||
|
|
@@ -311,6 +311,12 @@ int schedule_task_init(struct task *task, | |
| */ | ||
| void scheduler_init(int type, const struct scheduler_ops *ops, void *data); | ||
|
|
||
| /** | ||
| * freeing generic resource of a scheduler | ||
| * @param data Scheduler's private data. | ||
| */ | ||
| void scheduler_free(void *data); | ||
|
||
|
|
||
| /** @}*/ | ||
|
|
||
| #endif /* __SOF_SCHEDULE_SCHEDULE_H__ */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -573,13 +573,19 @@ static int reschedule_ll_task(void *data, struct task *task, uint64_t start) | |
|
|
||
| static void scheduler_free_ll(void *data) | ||
| { | ||
| struct ll_schedule_data *sch = data; | ||
| struct ll_schedule_data *ll_sch = data; | ||
|
||
| uint32_t flags; | ||
|
|
||
| irq_local_disable(flags); | ||
|
|
||
| notifier_unregister(sch, NULL, | ||
| NOTIFIER_CLK_CHANGE_ID(sch->domain->clk)); | ||
| notifier_unregister(ll_sch, NULL, | ||
| NOTIFIER_CLK_CHANGE_ID(ll_sch->domain->clk)); | ||
|
|
||
| /* free the generic scheduler resource */ | ||
| scheduler_free(ll_sch); | ||
|
||
|
|
||
| /* free ll_schedule_data */ | ||
| rfree(ll_sch); | ||
|
|
||
| irq_local_enable(flags); | ||
| } | ||
|
|
@@ -626,7 +632,7 @@ int scheduler_init_ll(struct ll_schedule_domain *domain) | |
| struct ll_schedule_data *sch; | ||
|
|
||
| /* initialize scheduler private data */ | ||
| sch = rzalloc(SOF_MEM_ZONE_SYS, 0, SOF_MEM_CAPS_RAM, sizeof(*sch)); | ||
| sch = rzalloc(SOF_MEM_ZONE_SYS_RUNTIME, 0, SOF_MEM_CAPS_RAM, sizeof(*sch)); | ||
| list_init(&sch->tasks); | ||
| atomic_init(&sch->num_tasks, 0); | ||
| sch->domain = domain; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be renamed to reflect the use cases i.e. we have
The flows will also be very similar for both 1 & 2 and diverge at some point, so this could be
idc_core_power_down();which in turn would call a generic