linux/arch
Menglong Dong 35561bab76 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c
The include/generated/asm-offsets.h is generated in Kbuild during
compiling from arch/SRCARCH/kernel/asm-offsets.c. When we want to
generate another similar offset header file, circular dependency can
happen.

For example, we want to generate a offset file include/generated/test.h,
which is included in include/sched/sched.h. If we generate asm-offsets.h
first, it will fail, as include/sched/sched.h is included in asm-offsets.c
and include/generated/test.h doesn't exist; If we generate test.h first,
it can't success neither, as include/generated/asm-offsets.h is included
by it.

In x86_64, the macro COMPILE_OFFSETS is used to avoid such circular
dependency. We can generate asm-offsets.h first, and if the
COMPILE_OFFSETS is defined, we don't include the "generated/test.h".

And we define the macro COMPILE_OFFSETS for all the asm-offsets.c for this
purpose.

Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
2025-09-25 09:57:15 +02:00
..
alpha arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
arc arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
arm arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
arm64 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
csky arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
hexagon arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
loongarch arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
m68k arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
microblaze arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
mips arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
nios2 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
openrisc arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
parisc arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
powerpc arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
riscv arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
s390 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
sh arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
sparc arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
um arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
x86 sched: Unify the SCHED_{SMT,CLUSTER,MC} Kconfig 2025-09-03 10:03:13 +02:00
xtensa arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
.gitignore
Kconfig sched: Unify the SCHED_{SMT,CLUSTER,MC} Kconfig 2025-09-03 10:03:13 +02:00