]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/microcode/AMD: Move the no-revision fixup to get_patch_level()
authorBorislav Petkov (AMD) <bp@alien8.de>
Sat, 30 May 2026 00:27:24 +0000 (17:27 -0700)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 4 Jun 2026 15:55:58 +0000 (08:55 -0700)
commit098bcea71b8d257d80b0037b97b66070806600a5
tree89c8f652e5a4084e155e9ee7425d309c6227caac
parent1458ade7469d7447499d4651abfaee9d4374857f
x86/microcode/AMD: Move the no-revision fixup to get_patch_level()

On machines which don't have microcode applied yet, the revision is 0.
However, this doesn't work with the Zen family/model/stepping patch
arithmetic. So move the fixup to the patch level getter function and
this way make sure the patch level is always proper and thus the
arithmetic always works.

And now that it can be called on any family, make this Zen-only.

Assisted-by: claude/claude-opus-4-6
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20260530024213.86137-1-bp@kernel.org
arch/x86/kernel/cpu/microcode/amd.c