public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: Segher Boessenkool <segher@kernel•crashing.org>
Cc: linuxppc-dev@ozlabs•org, cbe-oss-dev@ozlabs•org
Subject: Re: [Cbe-oss-dev] [RFC, PATCH] selection of CPU optimization
Date: Fri, 13 Apr 2007 02:10:47 +0200	[thread overview]
Message-ID: <200704130210.48508.arnd@arndb.de> (raw)
In-Reply-To: <e5b10849669a764f002d1926838edc76@kernel.crashing.org>

On Thursday 12 April 2007, Segher Boessenkool wrote:
> > What would be the right options to pass on e200 and on
> > pa6t?
>=20
> The best thing would be to add GCC -mcpu=3D options. =A0For
> now, you're probably best of with -mcpu=3Dpowerpc and
> -mcpu=3Dpowerpc64 resp., i.e. the "blended models". =A0This
> is a good option for multiplatform kernels too; add -mtune=3D
> to optimise for a specific core, but it will *work* on
> the whole family.

We already have makefile magic to test if gcc supports a flag
and fall back to some other one if not.

After looking at rs6000.c, I found that we can probably
reduce the number of different -mcpu=3D options to 16 and only
have separate -mtune=3D options for each specific cpu.

My understanding at this point is that we can always fall back
to -mcpu=3Dpowerpc or -mcpu=3Dpowerpc64, and also

(401, 505, power, power2, rsc) -> not supported

403 -> -mcpu=3D403
(405, 440) -> -mcpu=3D405
(e500, 85xx) -> -mcpu=3D8540
601 -> -mcpu=3D601
(6xx, g3, g4, e300, e600) -> -mcpu=3D603
(ec603e, e200, 82xx) -> -mcpu=3Dec603e
(8xx) -> -mcpu=3D860

(power3, rs64) -> -mcpu=3Dpower3
power4 -> -mcpu=3Dpower4 >> -mcpu=3Dpower3
970 -> -mcpu=3D970 >> -mcpu=3Dpower4
cell -> -mcpu=3Dcell >> -mcpu=3D970
power5 -> -mcpu=3Dpower5 >> -mcpu=3Dpower4
power5+ -> -mcpu=3Dpower5+ >> -mcpu=3Dpower5
power6 -> -mcpu=3Dpower6 >> -mcpu=3Dpower5+
power6x -> -mcpu=3Dpower6x >> -mcpu=3Dpower6
pa6t -> -mcpu=3Dpa6t >> (???)

So if we select e.g. power6 and cell, it needs to fall back to power4,
which is the common subset. Selecting both 403 and 405 would result
in falling back to -mcpu=3Dpowerpc, because they don't have any larger
subset.

I'm not sure what the right fallback fo pa6t should be. I would guess
that it's a superset of power6x and 970 when considering the kernel,
but it's not entirely clear what the fallback should be.

	Arnd <><

  reply	other threads:[~2007-04-13  0:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 11:15 [patch 3/3] cell: prevent alignment interrupt on local store Akinobu Mita
2007-04-10 12:52 ` Segher Boessenkool
2007-04-11  3:06   ` Akinobu Mita
2007-04-10 21:22 ` Benjamin Herrenschmidt
2007-04-11  2:56   ` Akinobu Mita
2007-04-11  3:30     ` Benjamin Herrenschmidt
2007-04-11 21:03       ` Segher Boessenkool
2007-04-12  4:23         ` Olaf Hering
2007-04-12  5:26           ` Benjamin Herrenschmidt
2007-04-12  6:33             ` Olaf Hering
2007-04-12  6:38               ` Benjamin Herrenschmidt
2007-04-12  8:31                 ` Gabriel Paubert
2007-04-12  8:48                   ` Benjamin Herrenschmidt
2007-04-12  6:50           ` Segher Boessenkool
2007-04-12  6:57             ` [Cbe-oss-dev] " Michael Ellerman
2007-04-12  7:07               ` Segher Boessenkool
2007-04-12 18:43           ` Arnd Bergmann
2007-04-12 18:55             ` Arnd Bergmann
2007-04-12 19:57               ` Segher Boessenkool
2007-04-12 19:52             ` Segher Boessenkool
2007-04-12 13:01   ` [RFC, PATCH] selection of CPU optimization Arnd Bergmann
2007-04-12 16:45     ` Kumar Gala
2007-04-12 17:26       ` [Cbe-oss-dev] " Arnd Bergmann
2007-04-12 18:17         ` Kumar Gala
2007-04-12 19:25           ` Arnd Bergmann
2007-04-12 20:04           ` Olof Johansson
2007-04-12 20:01             ` Segher Boessenkool
2007-04-12 20:22               ` Olof Johansson
2007-04-12 20:22                 ` Segher Boessenkool
2007-04-12 19:50         ` Segher Boessenkool
2007-04-13  0:10           ` Arnd Bergmann [this message]
2007-04-13  2:03             ` Olof Johansson
2007-04-13 18:43             ` 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=200704130210.48508.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=cbe-oss-dev@ozlabs$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=segher@kernel$(echo .)crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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