From: km <kyung.min.park@intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
"Luck, Tony" <tony.luck@intel.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"Raj, Ashok" <ashok.raj@intel.com>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
"Yu, Fenghua" <fenghua.yu@intel.com>
Subject: Re: [PATCH v3 3/3] x86/delay: Introduce TPAUSE delay
Date: Wed, 15 Apr 2020 12:57:16 -0700 [thread overview]
Message-ID: <c044d6001cf4ad25a8d13ba64c1d891721c16abd.camel@intel.com> (raw)
In-Reply-To: <20200414180545.GE2483@worktop.programming.kicks-ass.net>
Hi Peter,
On Tue, 2020-04-14 at 20:05 +0200, Peter Zijlstra wrote:
> On Tue, Apr 14, 2020 at 06:00:21PM +0000, Luck, Tony wrote:
> > > > +static inline void __tpause(u32 ecx, u32 edx, u32 eax)
> > > > +{
> > > > + /* "tpause %ecx, %edx, %eax;" */
> > > > + asm volatile(".byte 0x66, 0x0f, 0xae, 0xf1\t\n"
> > > > + :
> > > > + : "c"(ecx), "d"(edx), "a"(eax));
> > > > +}
> > >
> > > Can we please get a comment stating from what binutils version
> > > this
> > > opcode has a mnemonic? That way, when we raise the minimum
> > > binutils
> > > version we can easily grep and find such things.
> >
> > Or maybe use arch/x86/Kconfig.assembler to set up a
> > CONFIG_AS_TPAUSE?
> >
> > Then the code can read something like (syntax may need fixing)
> >
> > #ifdef CONFIG_AS_TPAUSE
> > asm volatile("tpause %ecx\n", : : "c"(ecx), "d"(edx),
> > "a"(eax));
> > #else
> > asm volatile(".byte hex gibberish ...
> > #endif
>
> Then we still need a comment to know when we can kill that...
Thanks. I'll update in next patch.
prev parent reply other threads:[~2020-04-15 20:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 23:29 [PATCH v3 0/3] x86/delay: Introduce TPAUSE instruction Kyung Min Park
2020-04-10 23:29 ` [PATCH v3 1/3] x86/delay: Preparatory code cleanup Kyung Min Park
2020-04-13 3:26 ` kbuild test robot
2020-04-10 23:29 ` [PATCH v3 2/3] x86/delay: Refactor delay_mwaitx() for TPAUSE support Kyung Min Park
2020-04-10 23:29 ` [PATCH v3 3/3] x86/delay: Introduce TPAUSE delay Kyung Min Park
2020-04-13 5:42 ` kbuild test robot
2020-04-14 10:31 ` Peter Zijlstra
2020-04-14 18:00 ` Luck, Tony
2020-04-14 18:05 ` Peter Zijlstra
2020-04-15 19:57 ` km [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c044d6001cf4ad25a8d13ba64c1d891721c16abd.camel@intel.com \
--to=kyung.min.park@intel.com \
--cc=ak@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=fenghua.yu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome