From: Segher Boessenkool <segher@kernel.crashing.org>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: add BookS wait opcode macro
Date: Wed, 20 Jul 2022 16:19:11 -0500 [thread overview]
Message-ID: <20220720211911.GI25951@gate.crashing.org> (raw)
In-Reply-To: <1658310023.4smrdizxcf.astroid@bobo.none>
On Wed, Jul 20, 2022 at 07:54:54PM +1000, Nicholas Piggin wrote:
> Excerpts from Segher Boessenkool's message of July 13, 2022 2:29 am:
> > The embedded extensions are no longer part of the PowerPC architecture,
> > so wouldn't it be a better way forward to rename the existing one,
> > instead? A bit more work now, but less in the future :-)
>
> And I actually misremembered this too, was off digging and asking
> about it, but the change isn't strictly BookE vs BookS, but rather
> the wait opcode was changed in ISA v3.0, which is a bit of an
> unfortunate landmine.
The current wait opcode is *new* in 3.0, but it has the same mnemonic
as the old one, more formally.
> It seems apparently POWER8 implemented a non-architected instruction
> 'waitasec' that uses this opcode, then I suppose it was decided to
> continue with that opcode in v3.0 when BookE was dropped, for reasons.
The (newer) wait instruction is 0/30 while the old one is 1/30
(secondary opcodes 30 resp. 62), although 0/30 stayed open; maybe there
is more history there already? Curious.
> In any case, I will rename it. Precedent is divided. We have
> PPC_RAW_TLBIEL_v205 for older tlbiel, and PPC_ISA_3_0_INVALIDATE_ERAT
> for a new ERAT invalidation instruction. I guess making the older
> instruction the exceptional case ends up being better in the long
> term.
Yeah exactly, it's better if the simpler name is the one that newer
code should use: more readable, more writable, and importantly less
room for mistakes :-)
Thanks,
Segher
prev parent reply other threads:[~2022-07-20 21:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 3:11 [PATCH 1/2] powerpc: add BookS wait opcode macro Nicholas Piggin
2022-07-11 3:11 ` [PATCH 2/2] powerpc/64s: Make POWER10 and later use pause_short in cpu_relax loops Nicholas Piggin
2022-07-12 16:29 ` [PATCH 1/2] powerpc: add BookS wait opcode macro Segher Boessenkool
2022-07-20 9:54 ` Nicholas Piggin
2022-07-20 21:19 ` Segher Boessenkool [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=20220720211911.GI25951@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).