linux/arch/powerpc
Menglong Dong bd0a905c22 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:18:04 +09:00
..
boot powerpc/boot/install.sh: Fix shellcheck warnings 2025-08-20 14:05:18 +05:30
configs Revert "eth: remove the DLink/Sundance (ST201) driver" 2025-09-02 15:49:41 -07:00
crypto lib/crypto: powerpc/sha1: Migrate optimized code into library 2025-07-14 11:11:49 -07:00
include powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure 2025-10-29 14:10:17 +01:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-11-02 22:18:04 +09:00
kexec Add a new optional ",cma" suffix to the crashkernel= command line option 2025-07-19 19:08:22 -07:00
kvm KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter() 2025-08-20 13:51:26 +05:30
lib Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm powerpc/32: Remove PAGE_KERNEL_TEXT to fix startup failure 2025-10-29 14:10:17 +01:00
net powerpc fixes for 6.17 #2 2025-08-03 19:15:04 -07:00
perf powerpc updates for 6.17 2025-07-29 20:28:38 -07:00
platforms treewide: remove MIGRATEPAGE_SUCCESS 2025-10-29 14:10:32 +01:00
purgatory Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
sysdev powerpc: Use dev_fwnode() 2025-08-20 13:53:10 +05:30
tools powerpc/ftrace: Fix ftrace bug with KASAN=y 2024-11-10 22:33:51 +11:00
xmon powerpc: Don't use --- in kernel logs 2025-04-29 11:41:38 +05:30
Kbuild powerpc64/ftrace: Move ftrace sequence out of line 2024-10-31 11:00:54 +11:00
Kconfig sched/fair: Get rid of sched_domains_curr_level hack for tl->cpumask() 2025-10-15 12:03:17 +02:00
Kconfig.debug powerpc: Remove UDBG_RTAS_CONSOLE 2025-02-26 21:15:09 +05:30
Makefile kbuild: Add missing $(objtree) prefix to powerpc crtsavres.o artifact 2025-10-15 12:03:14 +02:00
Makefile.postlink powerpc/ftrace: Add a postlink script to validate function tracer 2024-10-31 11:00:54 +11:00