All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/3] Add basic PowerPC core tune config
Date: Tue, 26 Jul 2011 20:21:27 +0100	[thread overview]
Message-ID: <1311708087.2344.305.camel@rex> (raw)
In-Reply-To: <4E2EF641.5050204@windriver.com>

On Tue, 2011-07-26 at 12:15 -0500, Mark Hatle wrote:
> On 7/26/11 12:05 PM, Richard Purdie wrote:
> > On Tue, 2011-07-26 at 11:53 -0500, Mark Hatle wrote:
> >> On 7/26/11 11:36 AM, Richard Purdie wrote:
> >>> On Tue, 2011-07-26 at 09:57 -0500, Mark Hatle wrote:
> >>>> On 7/26/11 7:44 AM, Richard Purdie wrote:
> >>>>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> >>>>> ---
> >>>>>  meta/conf/machine/include/powerpc/arch-powerpc.inc |   45 +++++++++++++++++++-
> >>>>>  meta/conf/machine/include/tune-ppc603e.inc         |   12 ++++-
> >>>>>  meta/conf/machine/include/tune-ppce300c2.inc       |   12 ++++-
> >>>>>  meta/conf/machine/include/tune-ppce500.inc         |   13 ++++--
> >>>>>  meta/conf/machine/include/tune-ppce500mc.inc       |   12 ++++-
> >>>>>  meta/conf/machine/include/tune-ppce500v2.inc       |   12 ++++-
> >>>>>  6 files changed, 88 insertions(+), 18 deletions(-)
> >>>>>
> >>>>> diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
> >>>>> index 17ace32..3f7befb 100644
> >>>>> --- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
> >>>>> +++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
> >>>>> @@ -1,3 +1,44 @@
> >>>>> -TUNE_ARCH = "powerpc"
> >>>>> +# Power Architecture definition
> >>>>> +# Four defined ABIs, all combinations of:
> >>>>> +# *) Hard/Soft Floating Point
> >>>>> +# *) 32-bit/64-bit
> >>>>> +
> >>>>> +DEFAULTTUNE ?= "powerpc"
> >>>>> +
> >>>>> +TUNEVALID[m32] = "Power ELF32 standard ABI"
> >>>>> +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
> >>>>> +
> >>>>> +TUNEVALID[m32-arch] = "Enable powerpc package architecture"
> >>>>> +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "m32-arch" ], "powerpc", "", d)}"
> >>>>> +
> >>>>> +TUNEVALID[m64] = "Power ELF64 standard ABI"
> >>>>> +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "n64", "-m64", "", d)}"
> >>>>> +
> >>>>> +TUNEVALID[m64-arch] = "Enable powerpc64 package architecture"
> >>>>> +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "m64-arch" ], "powerpc64", "", d)}"
> >>>>
> >>>> Why m32-arch and m64-arch?  If m32 or m64 is selected then it should mean
> >>>> powerpc or powerpc64.
> >>>
> >>> I've gotten confused here and mixed up TUNE_ARCH and TUNE_PKGARCH but
> >>> there was a reason.
> >>>
> >>> The missing piece is 
> >>>
> >>> TUNE_PKGARCH ?= "${TUNE_ARCH}"
> >>>
> >>> and the trouble comes when a tune file wants to change this only when
> >>> its tune config is in action.
> >>>
> >>> I'm thinking ahead to trying a mixed ppc 32 and 64 bit build where
> >>> TUNE_PKGARCH needs to take on the values for both configs.
> >>
> >> As far as I can tell, in all cases m32 = powerpc and m64 = powerpc64..  There is
> >> no way to mix a build of ppc32 and ppc64 w/o using the multilib code.
> >>
> >> The m32/m64 is the ABI, so only one can be present in the TUNE_FEATURES.. and
> >> passed via gcc through the TUNE_CCARGS.
> > 
> > Ok, say I use tune-ppcXXX and it sets TUNE_PKGARCH:
> > 
> > TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "ppc603e", "", d)}"
> > 
> > and I want a multilib config using this as the m32 ABI and also have
> > powerpc64 as my other multilib. I can't select that as it will get
> > TUNE_PKGARCH wrong in the 64 bit case since:
> > 
> > TUNE_PKGARCH ?= "${TUNE_ARCH}"
> > 
> > is overwritten. I guess we could do:
> > 
> > TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "ppc603e", "${TUNE_ARCH}", d)}"
> 
> ppc603e is the new option.. (lets say for argument it can run in 64-bit mode, in
> reality it can't and is an invalid config....)
> 
> TUNEVALID[ppc603e] = "PowerPC 603e Optimization"
> 
> # Note the TUNE_NAME is used differently from the TUNE_FEATURES
> TUNE_NAME ?= "ppc603e"
> 
> TUNE_FEATURES_ppc603e = "m32 ppc603e"
> TUNE_FEATURES_ppc603e-64 = "m64 ppc603e"
> 
> The if you include the tune-ppc603e.inc the default is the 32-bit version (what
> I'd consider the reasonable default...)  If you wanted the 64-bit version
> instead you'd simply change set the TUNE_NAME to "ppc603e-64" and the properly
> tuned set of features is set for you.
> 
> TUNE_PKGARCH_ppc603e = "ppc603e"
> TUNE_PKGARCH_ppc603e-64 = "ppc603e-64"

The thing is we don't' support the above syntax for TUNE_PKGARCH...

> etc...
> 
> in the default (ppc603e) case, the TUNE_ARCH should always be "powerpc", and in
> the ppc603e-64 case (if manually enabled), it would be "powerpc64"...
> 
> This is what was done in the ARM cases and I believe the core2 case in ia32.

which turns out to be broken :/.

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/ml4&id=244e28

is what I'm considering to "fix" this. I guess the config could do:

TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "ppc603e-64", "ppc603e-64", "ppc603e", d)}"

as per the x86 case but since this really limits the reuse of any of the
core variables as you might as well do:

AVAILTUNES = "ppc603e ppc603e-64" 

after doing that since TUNE_PKGARCH will be wrong in any other case.

Cheers,

Richard






  reply	other threads:[~2011-07-26 19:25 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1311683981.git.richard.purdie@linuxfoundation.org>
2011-07-26 12:44 ` [PATCH 1/3] Add ARM tune file overhaul based largely on work from Mark Hatle Richard Purdie
2011-07-26 12:46   ` Koen Kooi
2011-07-27 12:17   ` Phil Blundell
2011-07-27 13:33     ` Richard Purdie
2011-07-27 14:27       ` Mark Hatle
2011-07-27 14:33         ` Koen Kooi
2011-07-27 14:49           ` Mark Hatle
2011-07-27 14:57             ` Phil Blundell
2011-07-27 15:01               ` Koen Kooi
2011-07-27 15:08                 ` Phil Blundell
2011-07-27 15:13                   ` Koen Kooi
2011-07-27 15:17                     ` Phil Blundell
2011-07-29  6:31                   ` Khem Raj
2011-07-29  6:20             ` Khem Raj
2011-07-27 14:34         ` Richard Purdie
2011-07-27 14:44         ` Phil Blundell
2011-07-27 14:55           ` Mark Hatle
2011-07-29  6:18           ` Khem Raj
2011-07-29  7:15             ` Phil Blundell
2011-07-29  6:08       ` Khem Raj
2011-07-29  6:47         ` Phil Blundell
2011-07-29  6:51         ` Khem Raj
2011-07-27 14:34   ` Phil Blundell
2011-07-27 14:58     ` Mark Hatle
2011-07-27 15:25       ` Phil Blundell
2011-07-27 15:29         ` Richard Purdie
2011-07-27 15:49           ` Phil Blundell
2011-07-27 17:19         ` Mark Hatle
2011-07-27 19:31           ` Phil Blundell
2011-07-27 20:48             ` Mark Hatle
2011-07-27 21:16               ` Phil Blundell
2011-07-28  0:43                 ` Khem Raj
2011-07-28  7:24           ` Martin Jansa
2011-07-28  8:54             ` Phil Blundell
2011-07-28 18:17               ` Martin Jansa
2011-07-29  6:41           ` Khem Raj
2011-07-29  6:38         ` Khem Raj
2011-07-29  7:13           ` Phil Blundell
2011-07-29  6:27       ` Khem Raj
2011-07-27 17:31   ` do_rootfs broken, was: " Koen Kooi
2011-07-27 18:19     ` Koen Kooi
2011-07-28 11:39   ` Phil Blundell
2011-07-29  5:59   ` Khem Raj
2011-07-29  7:25     ` Phil Blundell
2011-07-29  8:22       ` Koen Kooi
2011-07-26 12:44 ` [PATCH 2/3] Add basic Mips core tune config Richard Purdie
2011-07-26 14:41   ` Mark Hatle
2011-07-26 16:51     ` Richard Purdie
2011-07-26 17:08       ` Mark Hatle
2011-07-26 19:47   ` Khem Raj
2011-08-11 11:25   ` Phil Blundell
2011-08-11 12:08     ` Richard Purdie
2011-08-11 12:29       ` Phil Blundell
2011-08-11 14:28         ` Richard Purdie
2011-08-11 14:49         ` Khem Raj
2011-08-12 14:35           ` Phil Blundell
2011-08-12 15:28             ` Khem Raj
2011-08-11 15:54     ` Mark Hatle
2011-07-26 12:44 ` [PATCH 3/3] Add basic PowerPC " Richard Purdie
2011-07-26 13:47   ` Kumar Gala
2011-07-26 13:59     ` Richard Purdie
2011-07-26 14:59       ` Mark Hatle
2011-07-26 15:22       ` Kumar Gala
2011-07-26 16:18         ` Richard Purdie
2011-07-26 21:56           ` Kumar Gala
2011-07-26 22:02           ` Kumar Gala
2011-07-26 22:29             ` Khem Raj
2011-07-26 22:52             ` Richard Purdie
2011-07-27  3:23               ` Kumar Gala
2011-07-27  8:36                 ` Richard Purdie
2011-07-27  8:44                   ` Koen Kooi
2011-07-27  9:30                     ` Richard Purdie
2011-07-28  5:25                       ` Add basic PowerPC core tune config (bug?) Kumar Gala
2011-07-28  6:09                         ` Saul Wold
2011-07-28  7:48                           ` Cui, Dexuan
2011-07-28  8:47                             ` Paul Eggleton
2011-07-28  8:57                               ` Koen Kooi
2011-07-28  9:20                                 ` Phil Blundell
2011-07-28 10:00                                   ` Koen Kooi
2011-07-28 10:03                                     ` Phil Blundell
2011-07-27  9:35                     ` [PATCH 3/3] Add basic PowerPC core tune config Phil Blundell
2011-07-26 22:03           ` Kumar Gala
2011-07-27  8:31             ` Richard Purdie
2011-07-26 20:03         ` Khem Raj
2011-07-26 14:57   ` Mark Hatle
2011-07-26 16:36     ` Richard Purdie
2011-07-26 16:53       ` Mark Hatle
2011-07-26 17:05         ` Richard Purdie
2011-07-26 17:15           ` Mark Hatle
2011-07-26 19:21             ` Richard Purdie [this message]
2011-07-26 20:28               ` Richard Purdie
2011-07-26 20:13       ` Khem Raj

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=1311708087.2344.305.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.