linux/arch/sh
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
..
boards mfd: tmio: Move header to platform_data 2024-07-09 10:40:29 +01:00
boot sh: Do not use hyphen in exported variable name 2025-08-15 12:13:56 +02:00
cchips sh: hd64461: Make setup_hd64461() static 2024-03-21 12:17:35 +01:00
configs sh: config: Drop CONFIG_MEMORY_{HOTPLUG,HOTREMOVE} 2024-07-14 10:59:39 +02:00
drivers sh: push-switch: Add missing MODULE_DESCRIPTION() macro 2024-07-16 17:52:36 +02:00
include move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-11-02 22:15:22 +09:00
lib Revert "sh: Handle calling csum_partial with misaligned data" 2024-05-02 12:02:38 +02:00
math-emu sh: math-emu: Add missing #include <asm/fpu.h> 2024-05-02 12:01:24 +02:00
mm mm: make arch_get_unmapped_area() take vm_flags by default 2024-09-09 16:39:13 -07:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kbuild sh: Move build rule for cchips/hd6446x/ to arch/sh/Kbuild 2023-07-05 18:55:18 +02:00
Kconfig crash, powerpc: default to CRASH_DUMP=n on PPC_BOOK3S_32 2024-11-14 22:43:48 -08:00
Kconfig.cpu docs: move superh documentation under Documentation/arch/ 2023-03-30 13:00:35 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-10-25 16:50:30 +02:00
Makefile sh: Do not use hyphen in exported variable name 2025-08-15 12:13:56 +02:00