From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Segher Boessenkool" <segher@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, Alan Modra <amodra@gmail.com>
Subject: Re: [RFC PATCH 5/7] powerpc/64s: update generic cpu option name and compiler flags
Date: Fri, 23 Sep 2022 17:22:11 +1000 [thread overview]
Message-ID: <CN3LLXC2YX9W.2QKWH8GWTOQW2@bobo> (raw)
In-Reply-To: <20220921152245.GD25951@gate.crashing.org>
On Thu Sep 22, 2022 at 1:22 AM AEST, Segher Boessenkool wrote:
> Hi!
>
> On Wed, Sep 21, 2022 at 11:01:18AM +1000, Nicholas Piggin wrote:
> > On Wed Sep 21, 2022 at 8:16 AM AEST, Segher Boessenkool wrote:
> > > On Tue, Sep 20, 2022 at 12:01:47AM +1000, Nicholas Piggin wrote:
> > > > Update the 64s GENERIC_CPU option. POWER4 support has been dropped, so
> > > > make that clear in the option name.
> > >
> > > AFAIR the minimum now is POWER4+ (ISA 2.01), not POWER5 (ISA 2.02).
> >
> > It's POWER5 now, because of commit 471d7ff8b5 ("powerpc/64s: Remove
> > POWER4 support"), which is misguided about POWER4+ and also introduced
> > the -mcpu=power5 bug on 970 builds :\
>
> ISA 2.01 added just a few things (LPES[0], HDEC, some PM things, but
> crucially also anything that sets MSR[PR] also sets MSR[EE] since then).
Ah, right. Some Book3 cleanups mainly.
> > Not sure it's worth adding POWER4+ support back but if someone has a
> > POWER4+ or adds it to QEMU TCG, I will do the patch.
>
> 970 is 2.01 -- pretending it is 2.02 is a ticking time bomb: the popcntb
> insn will be generated for popcount and parity intrinsics, which can be
> generated by generic code!
Yeah agreed, it was an error on my part with that original patch.
> > > > -mtune= before power8 is dropped because the minimum gcc version
> > > > supports power8, and tuning is made consistent between big and little
> > > > endian.
> > >
> > > Tuning for p8 on e.g. 970 gives quite bad results. No idea if anyone
> > > cares, but this is a serious regression if so.
> >
> > It's for "generic" kernel so we set low minimum but higher tune,
> > assuming that people would usually have newer, so it was already
> > doing -mtune=power7.
> >
> > We could make a specific 970/G5 entry though, since those still
> > have users.
>
> If that uses -mcpu=power4 (which means ISA 2.01 btw!) all is fine
> already? (Or -mcpu=970, same thing really, it just allows VMX as well).
Well it does -mcpu=power4 but the "generic" CPU option also does
the -mtune=power7 or 8. I added a -mcpu=970 version, even though
we don't let the compiler generate VMX in the kernel so I guess
it's not functionally different.
> Thanks for taking care of this Nick, much appreciated!
No problem, thanks for reviewing and finding my errors :P
Thanks,
Nick
next prev parent reply other threads:[~2022-09-23 7:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 14:01 [RFC PATCH 0/7] powerpc: first hack at pcrel addressing Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 1/7] powerpc: use 16-bit immediate for STACK_FRAME_REGS_MARKER Nicholas Piggin
2022-09-21 16:49 ` Christophe Leroy
2022-09-23 7:32 ` Michael Ellerman
2022-09-23 7:35 ` Christophe Leroy
2022-09-19 14:01 ` [RFC PATCH 2/7] powerpc/64: abstract asm global variable declaration and access Nicholas Piggin
2022-09-21 16:51 ` Christophe Leroy
2022-09-19 14:01 ` [RFC PATCH 3/7] powerpc/64: provide a helper macro to load r2 with the kernel TOC Nicholas Piggin
2022-09-21 16:52 ` Christophe Leroy
2022-09-19 14:01 ` [RFC PATCH 4/7] powerpc: add CFUNC assembly label annotation Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 5/7] powerpc/64s: update generic cpu option name and compiler flags Nicholas Piggin
2022-09-20 22:16 ` Segher Boessenkool
2022-09-21 1:01 ` Nicholas Piggin
2022-09-21 15:22 ` Segher Boessenkool
2022-09-23 7:22 ` Nicholas Piggin [this message]
2022-09-19 14:01 ` [RFC PATCH 6/7] powerpc/64s: POWER10 CPU Kconfig build option Nicholas Piggin
2022-09-19 14:01 ` [RFC PATCH 7/7] powerpc/64s: Add option to build vmlinux with pcrel addressing Nicholas Piggin
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=CN3LLXC2YX9W.2QKWH8GWTOQW2@bobo \
--to=npiggin@gmail.com \
--cc=amodra@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