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: Wed, 21 Sep 2022 11:01:18 +1000 [thread overview]
Message-ID: <CN1O97PLNVSM.VDXMAFRIPU9S@bobo> (raw)
In-Reply-To: <20220920221608.GB25951@gate.crashing.org>
On Wed Sep 21, 2022 at 8:16 AM AEST, Segher Boessenkool wrote:
> Hi!
>
> 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 :\
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.
> > -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.
> > Big endian drops -mcpu=power4 in favour of power5. Effectively the
> > minimum compiler version means power5 was always being selected here,
> > so this should not change anything. 970 / G5 code generation does not
> > seem to have been a problem with -mcpu=power5, but it's possible we
> > should go back to power4 to be really safe.
>
> Yes, -mcpu=power5 code does *not* run on 970, if you are unlucky enough
> that the compiler does something smart with popcntb (the sole non-float
> insn new on p5, not counting hrfid).
>
> > +# -mcpu=power5 should generate 970 compatible kernel code
>
> It doesn't. Even if it did, it would need more explanation!
Okay, sounds like we should go back to power4.
Thanks,
Nick
next prev parent reply other threads:[~2022-09-21 1:02 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 [this message]
2022-09-21 15:22 ` Segher Boessenkool
2022-09-23 7:22 ` Nicholas Piggin
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=CN1O97PLNVSM.VDXMAFRIPU9S@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