2021-07-25 09:25:06

by Thomas Gleixner

[permalink] [raw]
Subject: [GIT pull] core/urgent for v5.14-rc3

Linus,

please pull the latest core/urgent branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-2021-07-25

up to: e9ba16e68cce: smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining

A single update for the boot code to prevent aggressive un-inlining which
causes a section mismatch.

Thanks,

tglx

------------------>
Ingo Molnar (1):
smpboot: Mark idle_init() as __always_inlined to work around aggressive compiler un-inlining


kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index e4163042c4d6..21b7953f8242 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -47,7 +47,7 @@ void __init idle_thread_set_boot_cpu(void)
*
* Creates the thread if it does not exist.
*/
-static inline void idle_init(unsigned int cpu)
+static inline void __always_inline idle_init(unsigned int cpu)
{
struct task_struct *tsk = per_cpu(idle_threads, cpu);



2021-07-25 17:51:21

by pr-tracker-bot

[permalink] [raw]
Subject: Re: [GIT pull] core/urgent for v5.14-rc3

The pull request you sent on Sun, 25 Jul 2021 09:22:00 -0000:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-2021-07-25

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/9041a4d2ee2f551981689cb12066a872879f5d07

Thank you!

--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

2021-07-25 18:07:28

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT pull] core/urgent for v5.14-rc3

On Sun, Jul 25, 2021 at 2:23 AM Thomas Gleixner <[email protected]> wrote:
>
> A single update for the boot code to prevent aggressive un-inlining which
> causes a section mismatch.

Argh, I did my usual allmodconfig build tests and this looked clean,
and I've already pushed it out.

But I do my clang builds separately, and that showed the bug:

> -static inline void idle_init(unsigned int cpu)
> +static inline void __always_inline idle_init(unsigned int cpu)

Yeah, that's a bit too many "inline"s, and clang quite reasonably
warns about it:

kernel/smpboot.c:50:20: warning: duplicate 'inline' declaration
specifier [-Wduplicate-decl-specifier]

Plus now that I look at it, it also has that __always_inline misplaced
- we should put things like "static" and "inline" (and
"__always_inline") before the function type specifiers.

So that function definition _should_ have been

static __always_inline void idle_init(unsigned int cpu)

instead.

Oh well. I'll fix it up as a separate patch. I wish I had done the
clang build before pushing it out - and I wish the -tip tree started
tested clang as well at least in _some_ configuration.

Linus

2021-07-25 19:51:06

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [GIT pull] core/urgent for v5.14-rc3

On Sun, Jul 25 2021 at 11:06, Linus Torvalds wrote:
> On Sun, Jul 25, 2021 at 2:23 AM Thomas Gleixner <[email protected]> wrote:
> So that function definition _should_ have been
>
> static __always_inline void idle_init(unsigned int cpu)
>
> instead.
>
> Oh well. I'll fix it up as a separate patch. I wish I had done the
> clang build before pushing it out - and I wish the -tip tree started
> tested clang as well at least in _some_ configuration.

Bah, obvious and I overlooked it when staring at the diff. Duly noted
that clang will be part of the procedure soonish.

Thanks,

tglx