Skip to content

Commit a153d34

Browse files
committed
zephyr: userspace_helper: do not always build access helpers
Now that we have CONFIG_SOF_USERSPACE_LL, use it to conditionally drop some of the thread access helpers. Access to mailbox, DAIs and DMAs is currently only needed if LL thread is run in user-space. Leave these out if SOF is built for LL thread scheduling in kernel space. Signed-off-by: Kai Vehmanen <[email protected]>
1 parent 4e1827b commit a153d34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zephyr/lib/userspace_helper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ int user_memory_attach_common_partition(struct k_mem_domain *dom)
9494
return k_mem_domain_add_partition(dom, &common_partition);
9595
}
9696

97+
#ifdef CONFIG_SOF_USERSPACE_LL
98+
9799
int user_access_to_mailbox(struct k_mem_domain *domain, k_tid_t thread_id)
98100
{
99101
struct k_mem_partition mem_partition;
@@ -159,6 +161,8 @@ void user_grant_dma_access_all(struct k_thread *thread)
159161
}
160162
}
161163

164+
#endif /* CONFIG_SOF_USERSPACE_LL */
165+
162166
#else /* CONFIG_USERSPACE */
163167

164168
void *user_stack_allocate(size_t stack_size, uint32_t options)

0 commit comments

Comments
 (0)