Re: [PATCH] x86/setup: do not include kexec_handover.h from asm/setup.h

Borislav Petkov <[email protected]>
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel
Message-ID <20260703151111.GAakfRD6J8a1-g-aua@fat_crate.local>
On Fri, Jul 03, 2026 at 09:19:11AM +0300, Mike Rapoport wrote:
> The size does not matter ;-P

Yeah, that's what they all say :-P

> asm-generic would be my preference too if that's fine to include in
> decompressor.

Sure, the main idea is that if we add more linux/ namespace includes into the
decompressor, they end up pulling in the world and more and then you end up in
build and include hell. So we try to make sure only more or less
self-contained headers are included.

And there's a bunch of build magic in scripts/Makefile.asm-headers and this

# Support for using generic headers in asm-generic
asm-generic := -f $(srctree)/scripts/Makefile.asm-headers obj

in the main Makefile which lets you do things like that apparently:

$ git grep generic-y arch/x86/
arch/x86/include/asm/Kbuild:13:generic-y += early_ioremap.h
arch/x86/include/asm/Kbuild:14:generic-y += fprobe.h
arch/x86/include/asm/Kbuild:15:generic-y += mcs_spinlock.h
arch/x86/include/asm/Kbuild:16:generic-y += mmzone.h
arch/x86/include/asm/Kbuild:17:generic-y += ring_buffer.h

but you'd need to try it - I've only heard about it from the sidelines.

:-)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.