Re: [PATCH 14/20] x86/barrier: Use alternative_io() in 32-bit barrier functions

From: Josh Poimboeuf
Date: Fri Mar 14 2025 - 20:09:22 EST


On Fri, Mar 14, 2025 at 01:54:00PM -1000, Linus Torvalds wrote:
> On Fri, 14 Mar 2025 at 13:49, Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > because that ARG(), ARG(), ARGC() pattern looks odd to me.
> >
> > Maybe it's just me.
>
> Oh, and the other thing I reacted to is that I think the
> "alternative_io()" thing should be renamed.
>
> The "io" makes me think "actual I/O". As in PCI or disks or whatever.
> It always read oddly, but now it's *comletely* pointless, because the
> new macro model actually takes pretty much arbitrary asm arguments, to
> the "both input and output arguments" no longer makes any real sense.
>
> So I think it would be better to just call this "alternative_asm()",
> and make naming simpler. Hmm?

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.

--
Josh