From 7af4f7eb8a2ca9cd2eb3e5b2d2c74f31d2b2263e Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Thu, 18 Jan 2024 15:25:29 +0100 Subject: [PATCH] arch: riscv: offsets: fix header race condition It looks like some soc_offsets.h files need to be included before kernel_offsets, otherwise there are some header race conditions due to the infamous soc.h. This problem is exposed if all soc.h are removed from RISC-V arch header files (see the upcoming commits). It can be reproduced by building rv32m1_vega_ri5cy board after applying all the patches in this series (excluding this one, of course). Signed-off-by: Gerard Marull-Paretas --- arch/riscv/core/offsets/offsets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/core/offsets/offsets.c b/arch/riscv/core/offsets/offsets.c index 7730138a376..96982341b1a 100644 --- a/arch/riscv/core/offsets/offsets.c +++ b/arch/riscv/core/offsets/offsets.c @@ -16,7 +16,6 @@ #include #include #include -#include #ifdef CONFIG_RISCV_SOC_CONTEXT_SAVE #include @@ -25,6 +24,8 @@ #include #endif +#include + /* struct _callee_saved member offsets */ GEN_OFFSET_SYM(_callee_saved_t, sp); GEN_OFFSET_SYM(_callee_saved_t, ra);