Re: [PATCH -v2] x86/split_lock: Restructure the unwieldy switch-case in sld_state_show()

From: Borislav Petkov

Date: Fri Feb 27 2026 - 11:33:40 EST


On Thu, Feb 26, 2026 at 01:01:44PM -0800, Luck, Tony wrote:
> Only need the cpuhp_setup_state() for the sld_state == sld_warn case.
>
> > + if (boot_cpu_has(X86_FEATURE_SPLIT_LOCK_DETECT)) {
> > + pr_info("#AC: crashing the kernel on kernel split_locks and %s on user-space split_locks\n", action);
> > +
> if (sld_state == sld_warn) {

Remember that simplification?

https://lore.kernel.org/r/SJ1PR11MB6083BFCB1FFCE6DFE6F40D38FC84A@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette