Re: [PATCH] x86/alternative: Drop smp_locks glue
From: Mike Rapoport
Date: Sun Jun 14 2026 - 05:39:45 EST
On Sat, Jun 13, 2026 at 11:56:32AM -0700, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@xxxxxxxxx>
> Date: Sat, 13 Jun 2026 10:15:27 -0700
>
> This was there to be able to patch out locking instructions when running
> a SMP kernel build on a UP CPU. The times are long gone when single-CPU
> x86 machines were relevant so drop that machinery and simplify the code
> considerably.
>
> LOCK_PREFIX needs to stay for when one wants to do a UP build for
> whatever reason. That'll go away when CONFIG_SMP becomes unconditional.
>
> Kill a bunch of leftover, unused prototypes while at it.
>
> Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
FWIW:
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> ---
> arch/um/kernel/um_arch.c | 12 --
> arch/x86/include/asm/alternative.h | 47 +------
> arch/x86/include/asm/cmpxchg_32.h | 4 +-
> arch/x86/kernel/alternative.c | 190 -----------------------------
> arch/x86/kernel/kprobes/core.c | 3 -
> arch/x86/kernel/kprobes/opt.c | 1 -
> arch/x86/kernel/module.c | 13 +-
> arch/x86/kernel/smpboot.c | 3 -
> arch/x86/kernel/vmlinux.lds.S | 12 --
> arch/x86/tools/relocs.c | 2 +-
> tools/objtool/check.c | 1 -
> tools/objtool/klp-diff.c | 1 -
> 12 files changed, 9 insertions(+), 280 deletions(-)
--
Sincerely yours,
Mike.