From: Ingo Molnar <mingo@kernel.org>
To: "Borislav Petkov (AMD)" <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>, x86-ml <x86@kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86/boot: Get rid of linux/init.h include
Date: Fri, 22 Nov 2024 17:55:52 +0100 [thread overview]
Message-ID: <Z0C3mDCngAf7ErM2@gmail.com> (raw)
In-Reply-To: <20241122163139.GAZ0Cx63Ia9kgYgRIr@fat_crate.local>
* Borislav Petkov (AMD) <bp@alien8.de> wrote:
>
> this is what I think we should do (just a first patch) to decouple the
> decompressor from kernel proper headers namespace so that there's no
> collisions and ugly ifdeffery when those kernel proper headers get shared.
>
> And if we want to share things, we will use asm/shared/ to put such shared
> definitions there.
>
> Thoughts?
Sounds good.
> --- a/arch/x86/boot/compressed/head_32.S
> +++ b/arch/x86/boot/compressed/head_32.S
> @@ -24,7 +24,6 @@
> */
> .text
>
> -#include <linux/init.h>
> #include <linux/linkage.h>
> #include <asm/segment.h>
> #include <asm/page_types.h>
> @@ -32,6 +31,10 @@
> #include <asm/asm-offsets.h>
> #include <asm/bootparam.h>
>
> +#ifdef KERNEL_PROPER_HEADER
> +#error Do not include kernel proper namespace headers
> +#endif
The canonical solution in such cases is to use the existing header
guard, ie:
#ifdef _LINUX_INIT_H
# error Do not include kernel proper namespace headers
#endif
Then we can skip defining KERNEL_PROPER_HEADER as well, and this change
will be purely to x86 code.
Thanks,
Ingo
next prev parent reply other threads:[~2024-11-22 16:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 16:31 [RFC PATCH] x86/boot: Get rid of linux/init.h include Borislav Petkov (AMD)
2024-11-22 16:55 ` Ingo Molnar [this message]
2024-11-22 17:02 ` Borislav Petkov
2024-11-25 8:24 ` Ingo Molnar
2024-11-25 10:22 ` Borislav Petkov
2024-11-25 16:57 ` Brian Gerst
2024-11-25 17:09 ` Borislav Petkov
2024-11-25 17:31 ` Brian Gerst
2024-11-25 18:15 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z0C3mDCngAf7ErM2@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).