]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/CPU/AMD: Simplify the spectral chicken fix
authorBorislav Petkov (AMD) <bp@alien8.de>
Tue, 30 Dec 2025 11:07:31 +0000 (12:07 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 9 Jan 2026 10:36:52 +0000 (11:36 +0100)
commit736a2dcfdae72483a36793bc92182f33bd61d30e
tree1c5ef00b35b8e21d87a44769db89a519603fca77
parentc957072d44a735ebbe8385fc3511a4f5e6ccea93
x86/CPU/AMD: Simplify the spectral chicken fix

msr_set_bit() takes a bit number to set but MSR_ZEN2_SPECTRAL_CHICKEN_BIT
is a bit mask. The usual pattern that code uses is a _BIT-named type
macro instead of a mask.

So convert it to a bit number to reflect that.

Also, msr_set_bit() already does the reading and checking whether the
bit needs to be set so use that instead of a local variable.

Fixup tabbing while at it.

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://patch.msgid.link/20251230110731.28108-1-bp@kernel.org
arch/x86/include/asm/msr-index.h
arch/x86/kernel/cpu/amd.c
tools/arch/x86/include/asm/msr-index.h