Skip to content

Commit 04caf70

Browse files
povergoingstephanosio
authored andcommitted
arm64: smp: Fix the wrong secondary core stack size
The init stack of the secondary core should use KERNEL_STACK_BUFFER + sz Using Z_THREAD_STACK_BUFFER will calculate the wrong stack size. Signed-off-by: Jaxson Han <[email protected]>
1 parent 74d61fe commit 04caf70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/core/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
8585
return;
8686
}
8787

88-
arm64_cpu_boot_params.sp = Z_THREAD_STACK_BUFFER(stack) + sz;
88+
arm64_cpu_boot_params.sp = Z_KERNEL_STACK_BUFFER(stack) + sz;
8989
arm64_cpu_boot_params.fn = fn;
9090
arm64_cpu_boot_params.arg = arg;
9191
arm64_cpu_boot_params.cpu_num = cpu_num;

0 commit comments

Comments
 (0)