diff options
author | Borislav Petkov (AMD) <bp@alien8.de> | 2025-04-14 11:59:33 +0200 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2025-05-05 10:51:00 +0200 |
commit | 5214a9f6c0f56644acb9d2cbb58facf1856d322b (patch) | |
tree | 40064ce1822b86571e4cf9f714844631b8c3fba4 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 92a09c47464d040866cf2b4cd052bc60555185fb (diff) | |
download | linux-stable-5214a9f6c0f56644acb9d2cbb58facf1856d322b.tar.gz linux-stable-5214a9f6c0f56644acb9d2cbb58facf1856d322b.tar.bz2 linux-stable-5214a9f6c0f56644acb9d2cbb58facf1856d322b.zip |
x86/microcode: Consolidate the loader enablement checking
Consolidate the whole logic which determines whether the microcode loader
should be enabled or not into a single function and call it everywhere.
Well, almost everywhere - not in mk_early_pgtbl_32() because there the kernel
is running without paging enabled and checking dis_ucode_ldr et al would
require physical addresses and uglification of the code.
But since this is 32-bit, the easier thing to do is to simply map the initrd
unconditionally especially since that mapping is getting removed later anyway
by zap_early_initrd_mapping() and avoid the uglification.
In doing so, address the issue of old 486er machines without CPUID
support, not booting current kernels.
[ mingo: Fix no previous prototype for ‘microcode_loader_disabled’ [-Wmissing-prototypes] ]
Fixes: 4c585af7180c1 ("x86/boot/32: Temporarily map initrd for microcode loading")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/CANpbe9Wm3z8fy9HbgS8cuhoj0TREYEEkBipDuhgkWFvqX0UoVQ@mail.gmail.com
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions