[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240903075813.GM4723@noisy.programming.kicks-ass.net>
Date: Tue, 3 Sep 2024 09:58:13 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
x86@...nel.org, Miroslav Benes <mbenes@...e.cz>,
Petr Mladek <pmladek@...e.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
Song Liu <song@...nel.org>
Subject: Re: [RFC 07/31] kbuild: Remove "kmod" prefix from __KBUILD_MODNAME
On Mon, Sep 02, 2024 at 08:59:50PM -0700, Josh Poimboeuf wrote:
> Remove the arbitrary "kmod" prefix from __KBUILD_MODNAME and add it back
> manually in the __initcall_id() macro.
>
> This makes it more consistent, now __KBUILD_MODNAME is just the
> non-stringified version of KBUILD_MODNAME. It will come in handy for
> the upcoming "objtool klp diff".
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> ---
> include/linux/init.h | 3 ++-
> scripts/Makefile.lib | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 58cef4c2e59a..b1921f4a7b7e 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -206,12 +206,13 @@ extern struct module __this_module;
>
> /* Format: <modname>__<counter>_<line>_<fn> */
> #define __initcall_id(fn) \
> + __PASTE(kmod_, \
> __PASTE(__KBUILD_MODNAME, \
> __PASTE(__, \
> __PASTE(__COUNTER__, \
> __PASTE(_, \
> __PASTE(__LINE__, \
> - __PASTE(_, fn))))))
> + __PASTE(_, fn)))))))
:-(
Powered by blists - more mailing lists