arch: Align the implementation of stack related functions

arm: Avoid call k[u]mm_memalign to save the code size
ceva: Correct stack_base_ptr usage(top of stack v.s. bottom of stack)
mips: Correct the stack alignment in up_use_stack
misoc: Correct the stack alignment in up_use_stack
or1k: Correct the stack alignment in up_use_stack

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-02-15 18:11:30 +08:00
committed by archer
parent 3bf416e8b8
commit 872c570343
10 changed files with 113 additions and 77 deletions
+2 -2
View File
@@ -105,14 +105,14 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
if (ttype == TCB_FLAG_TTYPE_KERNEL)
{
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
tcb->stack_alloc_ptr = kmm_malloc(stack_size);
}
else
#endif
{
/* Use the user-space allocator if this is a task or pthread */
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
tcb->stack_alloc_ptr = kumm_malloc(stack_size);
}
#ifdef CONFIG_DEBUG_FEATURES