mirror-linux/arch/arc
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 ARC: migrate to the generic rule for built-in DTB 2025-01-18 08:52:09 +09:00
configs ARC: migrate to the generic rule for built-in DTB 2025-01-18 08:52:09 +09:00
include ARC fixes for 6.16 2025-06-12 08:17:56 -07:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
lib ARCv2: memset: don't prefetch for len == 0 which happens a alot 2023-08-17 12:40:26 -07:00
mm arch, mm: make releasing of memory to page allocator more explicit 2025-03-17 22:06:53 -07:00
net ARC: bpf: Correct conditional check in 'check_jmp_32' 2024-12-10 10:12:56 -08:00
plat-axs10x arc: Explicitly include correct DT includes 2023-08-23 22:28:53 -07:00
plat-hsdk arc: Replace lkml.org links with lore 2021-12-28 19:48:49 -08:00
plat-sim ARC: merge HAPS-HS with nSIM-HS configs 2019-10-28 12:12:31 -07:00
plat-tb10x treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
Kbuild ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
Kconfig Kbuild updates for v6.14 2025-01-31 12:07:07 -08:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile ARC: migrate to the generic rule for built-in DTB 2025-01-18 08:52:09 +09:00