mirror-linux/arch/nios2/kernel
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
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds 2025-06-07 14:38:07 +09:00
Makefile.syscalls nios2: convert to generic syscall table 2024-07-10 14:23:38 +02:00
asm-offsets.c arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
cpuinfo.c nios2: Replace strcpy() with strscpy() and simplify setup_cpuinfo() 2025-04-24 17:30:01 -05:00
entry.S nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
head.S
insnemu.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
irq.c nios2: Switch to irq_domain_create_linear() 2025-05-16 21:06:10 +02:00
kgdb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
misaligned.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
module.c arch: make execmem setup available regardless of CONFIG_MODULES 2024-05-14 00:31:44 -07:00
nios2_ksyms.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
prom.c nios2: migrate to the generic rule for built-in DTB 2025-04-06 06:22:01 +09:00
ptrace.c nios2: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:47 -07:00
setup.c arch, mm: set max_mapnr when allocating memory map for FLATMEM 2025-03-17 22:06:52 -07:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-15 11:25:32 -05:00
sys_nios2.c Take mmap lock in cacheflush syscall 2021-02-19 15:01:59 +08:00
syscall_table.c nios2: convert to generic syscall table 2024-07-10 14:23:38 +02:00
time.c nios2: Convert to using %pOFn instead of device_node.name 2018-09-28 16:39:27 -05:00
traps.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00