From ed8dd0fa63d571f31a64bfb4a4535ff3253c353c Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Wed, 14 Aug 2024 14:58:44 +0800 Subject: [PATCH] arch: riscv: stacktrace: undo the fp/sp alignment check in #76045 The change of alignment check in #76045 could be wrong and isn't unnecessary to fix the stack traces output, undo it for now. Signed-off-by: Yong Cong Sin Signed-off-by: Yong Cong Sin --- arch/riscv/core/stacktrace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/riscv/core/stacktrace.c b/arch/riscv/core/stacktrace.c index 54f70162420..361e152f00c 100644 --- a/arch/riscv/core/stacktrace.c +++ b/arch/riscv/core/stacktrace.c @@ -227,10 +227,7 @@ void arch_stack_walk(stack_trace_callback_fn callback_fn, void *cookie, static bool in_fatal_stack_bound(uintptr_t addr, const struct k_thread *const thread, const struct arch_esf *esf) { - const uintptr_t align = - COND_CODE_1(CONFIG_FRAME_POINTER, (ARCH_STACK_PTR_ALIGN), (sizeof(uintptr_t))); - - if (!IS_ALIGNED(addr, align)) { + if (!IS_ALIGNED(addr, sizeof(uintptr_t))) { return false; }