]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/microcode: Provide new control functions
authorThomas Gleixner <tglx@linutronix.de>
Mon, 2 Oct 2023 12:00:02 +0000 (14:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 15:45:53 +0000 (16:45 +0100)
commit058370ffef9988a5d18f21185b1c7cc4a8102676
tree7dad74167bf9ac36b52f24442aa13003b6d06be9
parent08631b02ad07049fcdf82c247ad9f418c252c29c
x86/microcode: Provide new control functions

commit 6067788f04b1020b316344fe34746f96d594a042 upstream

The current all in one code is unreadable and really not suited for
adding future features like uniform loading with package or system
scope.

Provide a set of new control functions which split the handling of the
primary and secondary CPUs. These will replace the current rendezvous
all in one function in the next step. This is intentionally a separate
change because diff makes an complete unreadable mess otherwise.

So the flow separates the primary and the secondary CPUs into their own
functions which use the control field in the per CPU ucode_ctrl struct.

   primary() secondary()
    wait_for_all()  wait_for_all()
    apply_ucode()  wait_for_release()
    release()  apply_ucode()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231002115903.377922731@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/microcode/core.c