x86/microcode: Simplify init path even more
authorBorislav Petkov <bp@suse.de>
Wed, 19 Oct 2022 17:07:30 +0000 (19:07 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 2 Nov 2022 15:45:46 +0000 (16:45 +0100)
commit2071c0aeda228107bf1b9e870b6187c90fbeef1d
tree87dd8548484e01423f95462e639e381034fa6540
parentb6f86689d5b740f2cc3ac3a1032c7374b24381cc
x86/microcode: Simplify init path even more

Get rid of all the IPI-sending functions and their wrappers and use
those which are supposed to be called on each CPU.

Thus:

- microcode_init_cpu() gets called on each CPU on init, applying any new
  microcode that the driver might've found on the filesystem.

- mc_cpu_starting() simply tries to apply cached microcode as this is
  the cpuhp starting callback which gets called on CPU resume too.

Even if the driver init function is a late initcall, there is no
filesystem by then (not even a hdd driver has been loaded yet) so a new
firmware load attempt cannot simply be done.

It is pointless anyway - for that there's late loading if one really
needs it.

Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Ashok Raj <ashok.raj@intel.com>
Link: https://lore.kernel.org/r/20221028142638.28498-3-bp@alien8.de
arch/x86/kernel/cpu/microcode/core.c