Skip to content

Commit b18e8ca

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 <kai.vehmanen@linux.intel.com>
1 parent 947349e commit b18e8ca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

zephyr/lib/userspace_helper.c

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

96+
#ifdef CONFIG_SOF_USERSPACE_LL
97+
9698
int user_access_to_mailbox(struct k_mem_domain *domain, k_tid_t thread_id)
9799
{
98100
struct k_mem_partition mem_partition;
@@ -162,6 +164,8 @@ void user_grant_dma_access_all(struct k_thread *thread)
162164
}
163165
}
164166

167+
#endif /* CONFIG_SOF_USERSPACE_LL */
168+
165169
#else /* CONFIG_USERSPACE */
166170

167171
void *user_stack_allocate(size_t stack_size, uint32_t options)

0 commit comments

Comments
 (0)