linux/arch/xtensa
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 xtensa: migrate to the generic rule for built-in DTB 2025-03-17 06:48:32 +03:00
configs Xtensa updates for v6.16 2025-06-03 09:05:01 -07:00
include Xtensa updates for v6.17 2025-08-09 07:35:03 +03:00
kernel arch: Add the macro COMPILE_OFFSETS to all the asm-offsets.c 2025-11-02 22:18:04 +09:00
lib xtensa: Use PCI_HEADER_TYPE_MFD instead of literal 2023-11-29 02:07:52 -08:00
mm arch, mm: make releasing of memory to page allocator more explicit 2025-03-17 22:06:53 -07:00
platforms xtensa: simdisk: add input size check in proc_write_simdisk 2025-10-19 16:37:31 +02:00
variants xtensa: add test_kc705_be variant 2018-08-20 12:34:45 -07:00
Kbuild xtensa: migrate to the generic rule for built-in DTB 2025-03-17 06:48:32 +03:00
Kconfig xtensa: migrate to the generic rule for built-in DTB 2025-03-17 06:48:32 +03:00
Kconfig.debug xtensa: dump userspace code around the exception PC 2023-06-24 06:34:27 -07:00
Makefile xtensa: don't produce FDPIC output with fdpic toolchain 2024-01-11 18:58:47 -08:00