]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/split_lock: Restructure the unwieldy switch-case in sld_state_show()
authorBorislav Petkov <bp@alien8.de>
Thu, 26 Feb 2026 14:50:33 +0000 (15:50 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 13 Mar 2026 15:57:02 +0000 (16:57 +0100)
commit04e43ec9f002ed1041b41a6df4c645ef3148da9f
tree18f8c93c3c4cce87ea2cfd10a6c85e0355e84c66
parentceea7868b594ccf376562af40b9463d9f2fb7dd0
x86/split_lock: Restructure the unwieldy switch-case in sld_state_show()

Split the handling in two parts:

1. handle the sld_state option first

2. handle X86_FEATURE flag-based printing afterwards

This splits the function nicely into two, separate logical things which
are easier to parse and understand.

Also, zap the printing in the disabled case.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://patch.msgid.link/20260226145033.GAaaBduQ0rWXydOkAm@fat_crate.local
arch/x86/kernel/cpu/bus_lock.c