Skip to contentSkip to conversation

tune-ppce5500: Add a tune file for PowerPC e5500 core

PATCH Superseded Kumar Gala 3 participants 6 messages Aug 5, 2011 – Aug 8, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 tune-ppce5500: Add a tune file for PowerPC e5500 core

---
 meta/conf/machine/include/tune-ppce5500.inc |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 meta/conf/machine/include/tune-ppce5500.inc
meta/conf/machine/include/tune-ppce5500.inc new file +14 -0
new file mode 100644
index 0000000..8e6403d
@@ -0,0 +1,14 @@
+DEFAULTTUNE ?= "ppce5500"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[ppce5500] = "Enable ppce5500 specific processor optimizations"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "-mcpu=e5500", "", d)}"
+TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}"
+
+AVAILTUNES += "ppce5500"
+TUNE_FEATURES_tune-ppce5500 = "m64 ppce5500"
+PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "powerpc64 ppce5500"
+
+# glibc configure options to get e5500 specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e5500"
Signature · 1 line
1.7.3.4
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Kumar Gala

meta/conf/machine/include/tune-ppce5500.inc | 14 ++++++++++++++ 1
files changed, 14 insertions(+), 0 deletions(-) create mode 100644 meta/conf/machine/include/tune-ppce5500.inc

Quoted 8 lines
(quoted diff) +0 -0

b/meta/conf/machine/include/tune-ppce5500.inc new file mode 100644 index 0000000..8e6403d --- /dev/null +++ b/meta/conf/machine/include/tune-ppce5500.inc @@ -0,0 +1,14 @@ +DEFAULTTUNE ?= "ppce5500" + +require conf/machine/include/powerpc/arch-powerpc64.inc + +TUNEVALID[ppce5500] = "Enable ppce5500 specific processor optimizations"

just a nit may be it should read "Enable ppce5500 processor specific optimizations"

Quoted 8 lines

+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "-mcpu=e5500", "", d)}" +TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}" + +AVAILTUNES += "ppce5500"

(quoted diff) +2 -0
+TUNE_FEATURES_tune-ppce5500 = "m64 ppce5500" 
+PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "powerpc64 ppce5500" + +# glibc

configure options to get e5500 specific library (for sqrt) +GLIBC_EXTRA_OECONF += "--with-cpu=e5500"

hmm so this essentially makes eglibc specific to this processor. Does it build eglibc inside work/ppce5500-oe-linux-gnuspe dir ? or something generic e.g. powerpc64-oe-linux-gnuspe dir ? In case its former then all is well but latter case may not be ok since we may not be able to share eglibc binaries with similar implementations of ppc64 in this case

I am more worried about proliferation into other architectures e.g. arm which has multiple armv7 implementations e.g.
- --
- -Khem
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk48XecACgkQuwUzVZGdMxRMtwCfVFeKRwn9xv8pksvWDi2r9VAG ntUAnjudbnXU2uiM1nINLU/rmtlIb4dT
=re3u
-----END PGP SIGNATURE-----

author
#2 lore raw
Quoted 36 lines · Khem Raj

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Kumar Gala

meta/conf/machine/include/tune-ppce5500.inc | 14 ++++++++++++++ 1
files changed, 14 insertions(+), 0 deletions(-) create mode 100644 meta/conf/machine/include/tune-ppce5500.inc

Quoted 8 lines
(quoted diff) +0 -0

b/meta/conf/machine/include/tune-ppce5500.inc new file mode 100644 index 0000000..8e6403d --- /dev/null +++ b/meta/conf/machine/include/tune-ppce5500.inc @@ -0,0 +1,14 @@ +DEFAULTTUNE ?= "ppce5500" + +require conf/machine/include/powerpc/arch-powerpc64.inc + +TUNEVALID[ppce5500] = "Enable ppce5500 specific processor optimizations"

just a nit may be it should read "Enable ppce5500 processor specific optimizations"

Quoted 8 lines

+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "-mcpu=e5500", "", d)}" +TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}" + +AVAILTUNES += "ppce5500"

(quoted diff) +2 -0
+TUNE_FEATURES_tune-ppce5500 = "m64 ppce5500" 
+PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "powerpc64 ppce5500" + +# glibc

configure options to get e5500 specific library (for sqrt) +GLIBC_EXTRA_OECONF += "--with-cpu=e5500"

hmm so this essentially makes eglibc specific to this processor. Does it build eglibc inside work/ppce5500-oe-linux-gnuspe dir ? or something generic e.g. powerpc64-oe-linux-gnuspe dir ? In case its former then all is well but latter case may not be ok since we may not be able to share eglibc binaries with similar implementations of ppc64 in this case

Quoted 2 lines

I am more worried about proliferation into other architectures e.g. arm which has multiple armv7 implementations e.g.

On PPC the works dirs are already somewhat 'tune' specific:

build-p5020/tmp/work/p5020_ds-poky-linux
build-p5020/tmp/work/ppce5500-poky-linux

An eglibc is built in ppce5500-poky-linux

- k

author
#3 lore raw
In reply to Kumar Gala
Quoted 28 lines · Kumar Gala

---
meta/conf/machine/include/tune-ppce5500.inc | 14 ++++++++++++++

1 files changed, 14 insertions(+), 0 deletions(-)

create mode 100644 meta/conf/machine/include/tune-ppce5500.inc

meta/conf/machine/include/tune-ppce5500.inc new file +14 -0
new file mode 100644
index 0000000..8e6403d
@@ -0,0 +1,14 @@
+DEFAULTTUNE ?= "ppce5500"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[ppce5500] = "Enable ppce5500 specific processor optimizations"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "-mcpu=e5500", "", d)}"
+TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}"
+
+AVAILTUNES += "ppce5500"
+TUNE_FEATURES_tune-ppce5500 = "m64 ppce5500"
+PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "powerpc64 ppce5500"
+
+# glibc configure options to get e5500 specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e5500"
Signature · 1 line
1.7.3.4

If I want to have a version of this for 32-bit only (or default) and one for 64-bit, how would it be best to handle that?

- k

#4 lore raw
Quoted 24 lines · Kumar Gala
Quoted 22 lines · Kumar Gala

---
meta/conf/machine/include/tune-ppce5500.inc | 14 ++++++++++++++

1 files changed, 14 insertions(+), 0 deletions(-)

create mode 100644 meta/conf/machine/include/tune-ppce5500.inc

meta/conf/machine/include/tune-ppce5500.inc new file +10 -0
new file mode 100644
index 0000000..8e6403d
@@ -0,0 +1,14 @@
+DEFAULTTUNE ?= "ppce5500"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[ppce5500] = "Enable ppce5500 specific processor optimizations"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "-mcpu=e5500", "", d)}"
+TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}"
+
+AVAILTUNES += "ppce5500"
+TUNE_FEATURES_tune-ppce5500 = "m64 ppce5500"
Quoted 8 lines
Quoted 6 lines
meta/conf/machine/include/tune-ppce5500.inc new file +4 -0
+PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "powerpc64 ppce5500"
+
+# glibc configure options to get e5500 specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e5500"
Signature · 1 line
1.7.3.4

If I want to have a version of this for 32-bit only (or default) and one for 64-bit, how would it be best to handle that?

I was wondering about this. You really need to make it conditional on something, e.g.

GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "m32", ""--with-cpu=e5500", "", d)}"

however, if you do this you need to ensure that TUNE_PKGARCH is not powerpc but something e5500 specific at this point since you are enabling e5500 specific optimisations.

Cheers,

Richard

author
#5 lore raw
Quoted 34 lines · Richard Purdie
Quoted 24 lines · Kumar Gala
Quoted 22 lines · Kumar Gala

---
meta/conf/machine/include/tune-ppce5500.inc | 14 ++++++++++++++

1 files changed, 14 insertions(+), 0 deletions(-)

create mode 100644 meta/conf/machine/include/tune-ppce5500.inc

meta/conf/machine/include/tune-ppce5500.inc new file +10 -0
new file mode 100644
index 0000000..8e6403d
@@ -0,0 +1,14 @@
+DEFAULTTUNE ?= "ppce5500"
+
+require conf/machine/include/powerpc/arch-powerpc64.inc
+
+TUNEVALID[ppce5500] = "Enable ppce5500 specific processor optimizations"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "-mcpu=e5500", "", d)}"
+TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}"
+
+AVAILTUNES += "ppce5500"
+TUNE_FEATURES_tune-ppce5500 = "m64 ppce5500"
Quoted 8 lines
Quoted 6 lines
meta/conf/machine/include/tune-ppce5500.inc new file +4 -0
+PACKAGE_EXTRA_ARCHS_tune-ppce5500 = "powerpc64 ppce5500"
+
+# glibc configure options to get e5500 specific library (for sqrt)
+GLIBC_EXTRA_OECONF += "--with-cpu=e5500"
Signature · 1 line
1.7.3.4

If I want to have a version of this for 32-bit only (or default) and one for 64-bit, how would it be best to handle that?

Quoted 4 lines

I was wondering about this. You really need to make it conditional on something, e.g.

GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "m32", ""--with-cpu=e5500", "", d)}"

Sorry, I meant for the whole file, not just the GLIBC_EXTRA_OECONF (That has to be done regardless of 32-bit or 64-bit).

Quoted 3 lines

however, if you do this you need to ensure that TUNE_PKGARCH is not powerpc but something e5500 specific at this point since you are enabling e5500 specific optimisations.

Which it is, or do you mean being more explicit about it via:

TUNE_PKGARCH = "ppce5500"

rather than:

TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "ppce5500", "ppce5500", "${PPCPKGARCH}", d)}"

- k