From: Peter Zijlstra <peterz@infradead.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Park, Kyung Min" <kyung.min.park@intel.com>,
"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: Tue, 14 Apr 2020 20:05:45 +0200 [thread overview]
Message-ID: <20200414180545.GE2483@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7F5E3E80@ORSMSX115.amr.corp.intel.com>
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...
next prev parent reply other threads:[~2020-04-14 18:06 UTC|newest]
Thread overview: 12+ 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-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-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 [this message]
2020-04-15 19:57 ` km
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=20200414180545.GE2483@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=ashok.raj@intel.com \
--cc=fenghua.yu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kyung.min.park@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.