x86/idle: Select idle routine only once
authorThomas Gleixner <tglx@linutronix.de>
Wed, 28 Feb 2024 22:20:32 +0000 (23:20 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 4 Mar 2024 16:39:24 +0000 (17:39 +0100)
commit35ce64922c8263448e58a2b9e8d15a64e11e9b2d
tree48f9c9e832c298fa03e74a9d56ee6c944065c89f
parent5f75916ec6ecdc6314b637746f3ad809f2fc7379
x86/idle: Select idle routine only once

The idle routine selection is done on every CPU bringup operation and
has a guard in place which is effective after the first invocation,
which is a pointless exercise.

Invoke it once on the boot CPU and mark the related functions __init.
The guard check has to stay as xen_set_default_idle() runs early.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/87edcu6vaq.ffs@tglx
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process.c