From eddf1189be2f9519363b8988dcdb7e49d7c60596 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Thu, 22 Oct 2020 09:46:07 +0900 Subject: [PATCH] arch: armv7-a: Fix CPUx IDLE stack top for SMP Summary: - This commit fixes CPUx IDLE stack top for SMP - Also removes SMP_STACK_TOP from smp.h Impact: - Affects armv7-a SMP only Testing: - Tested with sabre-6quad:smp (QEMU) Signed-off-by: Masayuki Ishikawa --- arch/arm/src/armv7-a/arm_cpuidlestack.c | 2 +- arch/arm/src/armv7-a/smp.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/src/armv7-a/arm_cpuidlestack.c b/arch/arm/src/armv7-a/arm_cpuidlestack.c index 7059e806eb..1acdeae717 100644 --- a/arch/arm/src/armv7-a/arm_cpuidlestack.c +++ b/arch/arm/src/armv7-a/arm_cpuidlestack.c @@ -135,7 +135,7 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size) stack_alloc = (uintptr_t)g_cpu_stackalloc[cpu]; DEBUGASSERT(stack_alloc != 0 && STACK_ISALIGNED(stack_alloc)); - top_of_stack = stack_alloc + SMP_STACK_TOP; + top_of_stack = stack_alloc + SMP_STACK_SIZE; tcb->adj_stack_size = SMP_STACK_SIZE; tcb->stack_alloc_ptr = (FAR uint32_t *)stack_alloc; diff --git a/arch/arm/src/armv7-a/smp.h b/arch/arm/src/armv7-a/smp.h index a94170c764..e168ce6805 100644 --- a/arch/arm/src/armv7-a/smp.h +++ b/arch/arm/src/armv7-a/smp.h @@ -58,7 +58,6 @@ #define SMP_STACK_MASK 7 #define SMP_STACK_SIZE ((CONFIG_SMP_IDLETHREAD_STACKSIZE + 7) & ~7) #define SMP_STACK_WORDS (SMP_STACK_SIZE >> 2) -#define SMP_STACK_TOP (SMP_STACK_SIZE - 8) /**************************************************************************** * Public Data