Re: [RFC PATCH] x86/boot: Get rid of linux/init.h include
From: Borislav Petkov
Date: Mon Nov 25 2024 - 12:12:56 EST
On Mon, Nov 25, 2024 at 11:57:37AM -0500, Brian Gerst wrote:
> How about removing the kernel headers that you don't want from the
> include path? This is a part of a broader issue where different parts
> of the kernel need different compiler flags (main kernel, VDSO, boot,
> etc.) and the current makefile structure doesn't handle that very
> well.
Right, the idea is to remove *all* include/linux/ headers from the
decompressor and have the build break if someone includes new ones, forcing
her/him to properly split such header and use asm/shared for the common stuff.
There are examples in asm/shared/ for that already.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette