x86/microcode/amd: Cache builtin/initrd microcode early
authorThomas Gleixner <tglx@linutronix.de>
Tue, 17 Oct 2023 21:23:53 +0000 (23:23 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 24 Oct 2023 13:05:54 +0000 (15:05 +0200)
commita7939f01672034a58ad3fdbce69bb6c665ce0024
tree424b539e02cce1fe38efd74d2f2c1feda4616f75
parentd419d28261e72e1c9ec418711b3da41df2265139
x86/microcode/amd: Cache builtin/initrd microcode early

There is no reason to scan builtin/initrd microcode on each AP.

Cache the builtin/initrd microcode in an early initcall so that the
early AP loader can utilize the cache.

The existing fs initcall which invoked save_microcode_in_initrd_amd() is
still required to maintain the initrd_gone flag. Rename it accordingly.
This will be removed once the AP loader code is converted to use the
cache.

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