mirror-linux/arch/nios2
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
..
boot nios2: migrate to the generic rule for built-in DTB 2025-04-06 06:22:01 +09:00
configs treewide: drop CONFIG_EMBEDDED 2023-08-21 13:46:25 -07:00
include mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
lib treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
mm nios2: do not introduce conflicting mappings when flushing tlb entries 2025-04-24 17:19:02 -05:00
platform nios2: migrate to the generic rule for built-in DTB 2025-04-06 06:22:01 +09:00
Kbuild nios2: migrate to the generic rule for built-in DTB 2025-04-06 06:22:01 +09:00
Kconfig - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
Kconfig.debug NIOS2: fix kconfig unmet dependency warning for SERIAL_CORE_CONSOLE 2021-09-24 08:49:39 -05:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00