]> www.infradead.org Git - users/jedix/linux-maple.git/commit
um/locking: Remove semicolon from "lock" prefix
authorUros Bizjak <ubizjak@gmail.com>
Fri, 28 Feb 2025 09:00:08 +0000 (10:00 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Mar 2025 10:04:55 +0000 (11:04 +0100)
commit089db01ea7eb4f366be45b9390a04f1c601c0071
tree944804f42b47f00dc2dfc50d8a1aa55d3f05bab9
parente82cf3051e6193f61e03898f8dba035199064d36
um/locking: Remove semicolon from "lock" prefix

Minimum version of binutils required to compile the kernel is 2.25.
This version correctly handles the "lock" prefix, so it is possible
to remove the semicolon, which was used to support ancient versions
of GNU as.

Due to the semicolon, the compiler considers "lock; insn" as two
separate instructions. Removing the semicolon makes asm length
calculations more accurate, consequently making scheduling and
inlining decisions of the compiler more accurate.

Removing the semicolon also enables assembler checks involving lock
prefix. Trying to assemble e.g. "lock andl %eax, %ebx" results in:

  Error: expecting lockable instruction after `lock'

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://patch.msgid.link/20250228090058.2499163-1-ubizjak@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/x86/um/asm/barrier.h