mirror-linux/arch/csky/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
..
probes kprobe/ftrace: bail out if ftrace was killed 2024-05-16 07:23:30 +09:00
vdso vdso: Rename included Makefile 2025-02-21 09:54:01 +01:00
Makefile arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds 2025-06-07 14:38:07 +09:00
Makefile.syscalls csky: 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
atomic.S csky: Remove prologue of page fault handler in entry.S 2021-01-12 09:52:40 +08:00
cpu-probe.c csky: Exception handling and mm-fault 2018-10-25 23:36:19 +08:00
entry.S Revert "csky: Add support for restartable sequence" 2022-11-11 04:59:28 -05:00
ftrace.c ftrace: Cleanup ftrace_dyn_arch_init() 2021-10-08 19:41:39 -04:00
head.S csky: Add memory layout 2.5G(user):1.5G(kernel) 2021-01-12 09:52:40 +08:00
irq.c irq: csky: perform irqentry in entry code 2021-10-26 10:13:27 +01:00
jump_label.c csky: Add jump-label implementation 2022-07-30 11:12:03 -04:00
module.c csky: fix old style declaration in module.c 2023-07-29 19:25:46 -04:00
perf_callchain.c uaccess: fix type mismatch warnings from access_ok() 2022-02-25 09:36:05 +01:00
perf_event.c csky/perf: Remove driver-specific throttle support 2025-05-21 13:57:45 +02:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
power.c csky: Use do_kernel_power_off() 2022-05-19 19:30:30 +02:00
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
ptrace.c csky: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names 2025-07-14 22:27:47 -07:00
setup.c csky: move setup_initrd() to setup.c 2025-03-17 22:06:51 -07:00
signal.c Revert "csky: Add support for restartable sequence" 2022-11-11 04:59:28 -05:00
smp.c smp: Consolidate smp_prepare_boot_cpu() 2024-03-04 12:01:54 +01:00
stacktrace.c csky: add arch support current_stack_pointer 2022-10-21 23:52:29 -04:00
syscall.c syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
syscall_table.c csky: convert to generic syscall table 2024-07-10 14:23:38 +02:00
time.c csky: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-23 12:48:55 +08:00
traps.c arch: include linux/cpu.h for trap_init() prototype 2023-11-23 11:32:31 +01:00
vdso.c csky/vdso: Remove arch_vma_name() 2024-11-02 12:37:32 +01:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00