-
Notifications
You must be signed in to change notification settings - Fork 369
[userspace LL] Scheduling part of #10945 #11138
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
base: main
Are you sure you want to change the base?
Changes from all commits
9d02a83
c3994f2
7a05a4a
e58f00a
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 |
|---|---|---|
|
|
@@ -62,7 +62,8 @@ void scheduler_dp_unlock(unsigned int key) | |
|
|
||
| void scheduler_dp_grant(k_tid_t thread_id, uint16_t core) | ||
| { | ||
| k_thread_access_grant(thread_id, &dp_lock[core]); | ||
| if (thread_id) | ||
| k_thread_access_grant(thread_id, &dp_lock[core]); | ||
| } | ||
|
|
||
| /* dummy LL task - to start LL on secondary cores */ | ||
|
|
@@ -224,10 +225,14 @@ static enum task_state scheduler_dp_ll_tick_dummy(void *data) | |
| * needed 1.2ms for processing - but the example would be too complicated) | ||
| */ | ||
|
|
||
| void scheduler_dp_ll_tick(void) | ||
| void z_impl_scheduler_dp_ll_tick(void) | ||
| { | ||
| unsigned int lock_key; | ||
| #if CONFIG_SOF_USERSPACE_LL | ||
| struct scheduler_dp_data *dp_sch = scheduler_get_user_data(SOF_SCHEDULE_DP); | ||
| #else | ||
| struct scheduler_dp_data *dp_sch = scheduler_get_data(SOF_SCHEDULE_DP); | ||
| #endif | ||
|
Comment on lines
+230
to
+234
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think longer term we could just call the single function here and have it do the right thing based on the Kconfig.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lgirdwood yep, will do something about this |
||
|
|
||
| if (!dp_sch) | ||
|
lyakh marked this conversation as resolved.
|
||
| return; | ||
|
|
@@ -240,6 +245,15 @@ void scheduler_dp_ll_tick(void) | |
| scheduler_dp_unlock(lock_key); | ||
| } | ||
|
|
||
| #ifdef CONFIG_USERSPACE | ||
| #include <zephyr/internal/syscall_handler.h> | ||
| void z_vrfy_scheduler_dp_ll_tick(void) | ||
| { | ||
| z_impl_scheduler_dp_ll_tick(); | ||
| } | ||
| #include <zephyr/syscalls/scheduler_dp_ll_tick_mrsh.c> | ||
| #endif | ||
|
|
||
| #if CONFIG_SOF_USERSPACE_APPLICATION | ||
| static int scheduler_dp_task_cancel(void *data, struct task *task) | ||
| { | ||
|
|
@@ -376,8 +390,11 @@ void scheduler_get_task_info_dp(struct scheduler_props *scheduler_props, uint32_ | |
| unsigned int lock_key; | ||
|
|
||
| scheduler_props->processing_domain = COMP_PROCESSING_DOMAIN_DP; | ||
| struct scheduler_dp_data *dp_sch = | ||
| (struct scheduler_dp_data *)scheduler_get_data(SOF_SCHEDULE_DP); | ||
| #if CONFIG_SOF_USERSPACE_LL | ||
| struct scheduler_dp_data *dp_sch = scheduler_get_user_data(SOF_SCHEDULE_DP); | ||
| #else | ||
| struct scheduler_dp_data *dp_sch = scheduler_get_data(SOF_SCHEDULE_DP); | ||
| #endif | ||
|
|
||
| lock_key = scheduler_dp_lock(cpu_get_id()); | ||
| scheduler_get_task_info(scheduler_props, data_off_size, &dp_sch->tasks); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.