[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9VHe7RSeFAyZfLR@gmail.com>
Date: Sat, 15 Mar 2025 10:25:15 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org,
linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
Uros Bizjak <ubizjak@...il.com>,
Andrew Cooper <andrew.cooper3@...rix.com>
Subject: Re: [PATCH 04/20] x86/cpu: Use named asm operands in clflushopt()
* Ingo Molnar <mingo@...nel.org> wrote:
>
> * Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> > On Fri, Mar 14, 2025 at 01:46:00PM -1000, Linus Torvalds wrote:
> > > On Fri, 14 Mar 2025 at 11:42, Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> > > >
> > > > + alternative_io(".byte 0x3e; clflush %[val]",
> > > > + ".byte 0x66; clflush %[val]", X86_FEATURE_CLFLUSHOPT,
> > > > + [val] "+m" (*(volatile char __force *)__p));
> > >
> > > Hmm. I think we could just use 'clflushopt', it looks like it exists
> > > in binutils-2.25, which is our minimal version requirement.
> > >
> > > But maybe that's a separate cleanup.
> >
> > You appear to be correct, I'll add a patch for that.
>
> Please base your series on tip:master or tip:x86/asm, we already
> cleaned this up recently:
>
> cc2e9e09d1a3 ("x86/asm: Use CLFLUSHOPT and CLWB mnemonics in <asm/special_insns.h>")
Also, as a general principle I'd prefer to have .byte conversion to
mnemonics and named-operands conversions to be separate patches - not
all named-operands conversions are an improvement, especially very
short and simple asm() templates are just fine using numeric operands.
Thanks,
Ingo
Powered by blists - more mailing lists