From: Nicholas Piggin <npiggin@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: add BookS wait opcode macro
Date: Wed, 20 Jul 2022 19:54:54 +1000 [thread overview]
Message-ID: <1658310023.4smrdizxcf.astroid@bobo.none> (raw)
In-Reply-To: <20220712162903.GO25951@gate.crashing.org>
Excerpts from Segher Boessenkool's message of July 13, 2022 2:29 am:
> Hi!
>
> On Mon, Jul 11, 2022 at 01:11:27PM +1000, Nicholas Piggin wrote:
>> The wait instruction has a different encoding between BookE and BookS.
>> Add the BookS variant.
>
>> #define PPC_RAW_WAIT(w) (0x7c00007c | __PPC_WC(w))
>> +#define PPC_RAW_WAIT_BOOKS(w, p) (0x7c00003c | __PPC_WC(w) | __PPC_PL(p))
>
> 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.
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.
Maybe it was more widely used?
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.
Thanks,
Nick
next prev parent reply other threads:[~2022-07-20 9:55 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 [this message]
2022-07-20 21:19 ` Segher Boessenkool
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=1658310023.4smrdizxcf.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=segher@kernel.crashing.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;
as well as URLs for NNTP newsgroup(s).