linux/arch/xtensa/kernel
Menglong Dong cc89ac0ca5 arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c
[ Upstream commit 35561bab76 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-02 22:15:22 +09:00
..
syscalls mseal: wire up mseal syscall 2024-05-23 19:40:26 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
align.S xtensa: fix unaligned and load/store configuration interaction 2023-07-10 21:41:04 -07:00
asm-offsets.c arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-11-02 22:15:22 +09:00
coprocessor.S xtensa: support coprocessors on SMP 2022-05-01 19:51:23 -07:00
entry.S RCU pull request for v5.20 (or whatever) 2022-08-02 19:12:45 -07:00
head.S xtensa: use register window specific opcodes only when present 2021-10-18 22:19:35 -07:00
hibernate.c xtensa: add hibernation support 2022-05-01 19:51:24 -07:00
hw_breakpoint.c xtensa: hw_breakpoint: include header for missing prototype 2023-09-20 05:03:21 -07:00
irq.c xtensa: irq: include <asm/traps.h> 2023-09-20 05:03:18 -07:00
jump_label.c xtensa: patch_text: Fixup last cpu should be master 2022-04-13 03:36:34 -07:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
mcount.S xtensa: add asm-prototypes.h 2023-06-12 19:48:57 -07:00
module.c xtensa: clean up custom-controlled debug output 2017-12-16 22:37:08 -08:00
mxhead.S xtensa: add missing XCHAL_HAVE_WINDOWED check 2022-03-09 13:59:15 -08:00
pci-dma.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
pci.c xtensa: fix warning comparing pointer to 0 2021-04-04 15:39:02 -07:00
perf_event.c xtensa: PMU: fix base address for the newer hardware 2023-08-27 19:22:56 -07:00
platform.c xtensa: clean up default platform functions 2023-06-12 19:48:56 -07:00
process.c xtensa: fix MAKE_PC_FROM_RA second argument 2024-04-02 19:42:35 -07:00
ptrace.c xtensa: ptrace: add prototypes to <asm/ptrace.h> 2023-09-20 05:03:19 -07:00
s32c1i_selftest.c xtensa: clean up exception handler prototypes 2022-05-01 19:51:22 -07:00
setup.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-05 14:01:32 +01:00
signal.c xtensa: signal: include headers for function prototypes 2023-09-20 05:03:19 -07:00
smp.c xtensa: smp: add headers for missing function prototypes 2023-09-20 05:03:20 -07:00
stacktrace.c xtensa: fix MAKE_PC_FROM_RA second argument 2024-04-02 19:42:35 -07:00
syscall.c mm: make arch_get_unmapped_area() take vm_flags by default 2024-09-09 16:39:13 -07:00
time.c xtensa: drop platform_heartbeat 2023-06-12 19:48:55 -07:00
traps.c xtensa: traps: add <linux/cpu.h> for function prototype 2023-09-20 05:03:20 -07:00
vectors.S xtensa: rename PT_SIZE to PT_KERNEL_SIZE 2022-03-07 12:02:48 -08:00
vmlinux.lds.S xtensa: add XIP-aware MTD support 2023-08-28 18:25:23 -07:00
xtensa_ksyms.c xtensa: add asm-prototypes.h 2023-06-12 19:48:57 -07:00