linux/arch/um/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
..
skas Revert "um: work around sched_yield not yielding in time-travel mode" 2025-05-18 08:24:57 +02:00
asm-offsets.c arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-11-02 22:15:22 +09:00
config.c.in um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
dtb.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
dyn.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
exec.c um: Remove the call to SUBARCH_EXECVE1 macro 2024-09-12 20:42:22 +02:00
exitcode.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
gprof_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
initrd.c um: Extract load file helper from initrd.c 2021-12-22 20:32:36 +01:00
ioport.c um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
irq.c um: Enable preemption in UML 2024-07-03 17:10:43 +02:00
kmsg_dump.c printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
ksyms.c um: generalize os_rcv_fd 2024-07-03 12:24:25 +02:00
load_file.c um: Extract load file helper from initrd.c 2021-12-22 20:32:36 +01:00
Makefile um: remove copy_from_kernel_nofault_allowed 2025-04-10 14:39:25 +02:00
mem.c um: Update min_low_pfn to match changes in uml_reserved 2025-05-29 11:02:14 +02:00
physmem.c um: Fix potential integer overflow during physmem setup 2024-12-05 14:03:02 +01:00
process.c um: Re-evaluate thread flags repeatedly 2025-08-20 18:30:32 +02:00
ptrace.c um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
reboot.c um: Remove unused mm_fd field from mm_id 2024-09-12 20:36:22 +02:00
sigio.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
signal.c um: Drop support for hosts without SYSEMU_SINGLESTEP support 2024-01-04 23:29:11 +01:00
stacktrace.c UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
sysrq.c um: Always dump trace for specified task in show_stack 2024-12-05 14:03:03 +01:00
time.c um: Remove unused mm_fd field from mm_id 2024-09-12 20:36:22 +02:00
tlb.c um: Remove the redundant newpage check in update_pte_range 2024-09-12 20:34:39 +02:00
trap.c um: use proper care when taking mmap lock during segfault 2025-07-06 11:01:34 +02:00
um_arch.c um: Remove unused ncpus variable 2024-07-03 12:21:57 +02:00
um_arch.h um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
umid.c uml: Remove the initialization of statics to 0 2022-09-19 23:10:07 +02:00
uml.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux.lds.S UML: define RUNTIME_DISCARD_EXIT 2023-02-13 10:14:31 +01:00