mirror-linux/arch/riscv
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 riscv: dts: thead: Add APB clocks for TH1520 GMACs 2025-08-12 12:52:21 +02:00
configs soc: defconfig updates for 6.16 2025-07-29 11:27:41 -07:00
crypto lib/crypto: riscv/sha512: Migrate optimized SHA-512 code to library 2025-06-30 09:26:19 -07:00
errata RISC-V: errata: Use medany for relocatable builds 2025-03-26 15:56:37 -07:00
include Rust changes for v6.17 2025-08-03 13:49:10 -07:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-09-25 09:57:15 +02:00
kvm RISC-V: KVM: fix stack overrun when loading vlenb 2025-08-25 10:26:20 +05:30
lib Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
mm Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
net bpf, riscv64: Skip redundant zext instruction after load-acquire 2025-05-09 10:05:27 -07:00
purgatory Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
tools riscv: Stop considering R_RISCV_NONE as bad relocations 2025-07-16 08:13:55 -07:00
Kbuild riscv: migrate to the generic rule for built-in DTB 2025-03-18 13:30:13 +00:00
Kconfig sched: Unify the SCHED_{SMT,CLUSTER,MC} Kconfig 2025-09-03 10:03:13 +02:00
Kconfig.debug
Kconfig.errata riscv: Add ghostwrite vulnerability 2025-01-18 12:33:39 -08:00
Kconfig.socs riscv: add Andes SoC family Kconfig support 2025-07-21 16:51:52 +02:00
Kconfig.vendor riscv: Add SiFive xsfvqmaccdod and xsfvqmaccqoq vendor extensions 2025-05-08 11:01:43 -07:00
Makefile riscv: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS 2025-06-05 11:09:30 -07:00
Makefile.postlink kbuild: Create intermediate vmlinux build with relocations preserved 2025-03-17 00:29:50 +09:00