kernel: thread: Allow stack in coherent memory
When allowing dynamic thread stack allocation the stack may come from the heap in coherent memory, trying to use cached memory is over complicated because of heap meta data and cache line sizes. Also when userspace is enabled, stacks have to be page aligned and the address of the stack is used to track kernel objects. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
eef605d6cc
commit
d622533ca7
1 changed files with 7 additions and 0 deletions
|
@ -641,7 +641,14 @@ char *z_setup_new_thread(struct k_thread *new_thread,
|
|||
* still cached!
|
||||
*/
|
||||
__ASSERT_NO_MSG(arch_mem_coherent(new_thread));
|
||||
|
||||
/* When dynamic thread stack is available, the stack may come from
|
||||
* uncached area.
|
||||
*/
|
||||
#ifndef CONFIG_DYNAMIC_THREAD
|
||||
__ASSERT_NO_MSG(!arch_mem_coherent(stack));
|
||||
#endif /* CONFIG_DYNAMIC_THREAD */
|
||||
|
||||
#endif
|
||||
|
||||
arch_new_thread(new_thread, stack, stack_ptr, entry, p1, p2, p3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue