Re: [PATCH 14/20] x86/barrier: Use alternative_io() in 32-bit barrier functions
From: Linus Torvalds
Date: Fri Mar 14 2025 - 20:17:24 EST
On Fri, 14 Mar 2025 at 14:09, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> Thing is, we still have alternative(), which is also an asm wrapper, but
> it's for when the caller doesn't care about adding any constraints.
>
> So the "_io()" distinguishes from that.
.. but I think it does so very badly because "io" really means
something else entirely in absolutely all other contexts.
And it really makes no sense as "io", since it doesn't take inputs and
outputs, it takes inputs, outputs AND CLOBBERS.
So it would make more sense to call it "ioc", but that's just obvious
nonsense, and "ioc" is already taken as a globally recognized
shorthand for "corruption in sports".
So "ioc" is bad too, but that should make you go "Oh, 'io' is _doubly_
nonsensical".
Ergo: I think "asm" would be a better distinguishing marker, withg the
plain "alternative()" being used for particularly simple asms.
Linus