Patchwork tune-cortexa5.inc: add tune file for cortex-a5, based on a7

login
register
mail settings
Submitter Andy Voltz
Date June 3, 2013, 4:40 p.m.
Message ID <1370277617-26698-1-git-send-email-andy.voltz@timesys.com>
Download mbox | patch
Permalink /patch/51105/
State New
Headers show

Comments

Andy Voltz - June 3, 2013, 4:40 p.m.
Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
---
 meta/conf/machine/include/tune-cortexa5.inc |   36 +++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 meta/conf/machine/include/tune-cortexa5.inc
Otavio Salvador - June 3, 2013, 4:51 p.m.
Hello,


On Mon, Jun 3, 2013 at 1:40 PM, Andy Voltz <andy.voltz@timesys.com> wrote:

> Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
>

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

For a background: Andy is adding support to Freescale Vybrid SoCs support
and this patch is need so we can add the board (and SoC) support in
meta-fsl-arm.

Regards,
Marcin Juszkiewicz - June 3, 2013, 9:18 p.m.
W dniu 03.06.2013 18:40, Andy Voltz pisze:
> Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
> ---
>  meta/conf/machine/include/tune-cortexa5.inc |   36 +++++++++++++++++++++++++++

I think that it is time to create simple tune-cortex.inc which would be
used by cores tunes to set all of it.

So tune-cortexa5.inc would be:

----
CORTEX_ID   = "a5"
CORTEX_NAME = "A5"

require conf/machine/include/arm/tune-cortex.inc
----

and tune-cortex.inc will have things like:

----
DEFAULTTUNE ?= "armv7a-neon"

require conf/machine/include/arm/arch-armv7a.inc

TUNEVALID[cortex${CORTEX_ID}] = "Enable Cortex-${CORTEX_NAME} specific
processor optimizations"
TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES",
"cortex${CORTEX_ID}", " -mtune=cortex-${CORTEX_ID}", "", d)}"

# Little Endian base configs
AVAILTUNES += "cortex${CORTEX_ID} cortex${CORTEX_ID}t
cortex${CORTEX_ID}-neon cortex${CORTEX_ID}t-neon"
ARMPKGARCH_tune-cortex${CORTEX_ID} = "cortex${CORTEX_ID}"
ARMPKGARCH_tune-cortex${CORTEX_ID}t = "cortex${CORTEX_ID}"
ARMPKGARCH_tune-cortex${CORTEX_ID}-neon = "cortex${CORTEX_ID}"
ARMPKGARCH_tune-cortex${CORTEX_ID}t-neon = "cortex${CORTEX_ID}"
TUNE_FEATURES_tune-cortex${CORTEX_ID} = "${TUNE_FEATURES_tune-armv7a}
cortex${CORTEX_ID}"
TUNE_FEATURES_tune-cortex${CORTEX_ID}t = "${TUNE_FEATURES_tune-armv7at}
cortex${CORTEX_ID}"
TUNE_FEATURES_tune-cortex${CORTEX_ID}-neon =
"${TUNE_FEATURES_tune-armv7a-neon} cortex${CORTEX_ID}"
TUNE_FEATURES_tune-cortex${CORTEX_ID}t-neon =
"${TUNE_FEATURES_tune-armv7at-neon} cortex${CORTEX_ID}"
PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID} =
"${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortex${CORTEX_ID}-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}t =
"${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortex${CORTEX_ID}-vfp
cortex${CORTEX_ID}t2-vfp"
PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}-neon =
"${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortex${CORTEX_ID}-vfp
cortex${CORTEX_ID}-vfp-neon"
PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}t-neon =
"${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortex${CORTEX_ID}-vfp
cortex${CORTEX_ID}-vfp-neon cortex${CORTEX_ID}t2-vfp
cortex${CORTEX_ID}t2-vfp-neon"

[..]
-----

What do you think?
Otavio Salvador - June 3, 2013, 9:51 p.m.
On Mon, Jun 3, 2013 at 6:18 PM, Marcin Juszkiewicz <
marcin@juszkiewicz.com.pl> wrote:

> W dniu 03.06.2013 18:40, Andy Voltz pisze:
> > Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
> > ---
> >  meta/conf/machine/include/tune-cortexa5.inc |   36
> +++++++++++++++++++++++++++
>
> I think that it is time to create simple tune-cortex.inc which would be
> used by cores tunes to set all of it.
>
> So tune-cortexa5.inc would be:
>
> ----
> CORTEX_ID   = "a5"
> CORTEX_NAME = "A5"
>
> require conf/machine/include/arm/tune-cortex.inc
> ----
>
> and tune-cortex.inc will have things like:
>
> ----
> DEFAULTTUNE ?= "armv7a-neon"
>
> require conf/machine/include/arm/arch-armv7a.inc
>
> TUNEVALID[cortex${CORTEX_ID}] = "Enable Cortex-${CORTEX_NAME} specific
> processor optimizations"
> TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES",
> "cortex${CORTEX_ID}", " -mtune=cortex-${CORTEX_ID}", "", d)}"
>
> # Little Endian base configs
> AVAILTUNES += "cortex${CORTEX_ID} cortex${CORTEX_ID}t
> cortex${CORTEX_ID}-neon cortex${CORTEX_ID}t-neon"
> ARMPKGARCH_tune-cortex${CORTEX_ID} = "cortex${CORTEX_ID}"
> ARMPKGARCH_tune-cortex${CORTEX_ID}t = "cortex${CORTEX_ID}"
> ARMPKGARCH_tune-cortex${CORTEX_ID}-neon = "cortex${CORTEX_ID}"
> ARMPKGARCH_tune-cortex${CORTEX_ID}t-neon = "cortex${CORTEX_ID}"
> TUNE_FEATURES_tune-cortex${CORTEX_ID} = "${TUNE_FEATURES_tune-armv7a}
> cortex${CORTEX_ID}"
> TUNE_FEATURES_tune-cortex${CORTEX_ID}t = "${TUNE_FEATURES_tune-armv7at}
> cortex${CORTEX_ID}"
> TUNE_FEATURES_tune-cortex${CORTEX_ID}-neon =
> "${TUNE_FEATURES_tune-armv7a-neon} cortex${CORTEX_ID}"
> TUNE_FEATURES_tune-cortex${CORTEX_ID}t-neon =
> "${TUNE_FEATURES_tune-armv7at-neon} cortex${CORTEX_ID}"
> PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID} =
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortex${CORTEX_ID}-vfp"
> PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}t =
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortex${CORTEX_ID}-vfp
> cortex${CORTEX_ID}t2-vfp"
> PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}-neon =
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortex${CORTEX_ID}-vfp
> cortex${CORTEX_ID}-vfp-neon"
> PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}t-neon =
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortex${CORTEX_ID}-vfp
> cortex${CORTEX_ID}-vfp-neon cortex${CORTEX_ID}t2-vfp
> cortex${CORTEX_ID}t2-vfp-neon"
>
> [..]
> -----
>
> What do you think?


I fully agree :-)
Mark Hatle - June 3, 2013, 10:09 p.m.
On 6/3/13 4:51 PM, Otavio Salvador wrote:
>
>
>
> On Mon, Jun 3, 2013 at 6:18 PM, Marcin Juszkiewicz <marcin@juszkiewicz.com.pl
> <mailto:marcin@juszkiewicz.com.pl>> wrote:
>
>     W dniu 03.06.2013 18:40, Andy Voltz pisze:
>      > Signed-off-by: Andy Voltz <andy.voltz@timesys.com
>     <mailto:andy.voltz@timesys.com>>
>      > ---
>      >  meta/conf/machine/include/tune-cortexa5.inc |   36
>     +++++++++++++++++++++++++++
>
>     I think that it is time to create simple tune-cortex.inc which would be
>     used by cores tunes to set all of it.
>
>     So tune-cortexa5.inc would be:
>
>     ----
>     CORTEX_ID   = "a5"
>     CORTEX_NAME = "A5"
>
>     require conf/machine/include/arm/tune-cortex.inc
>     ----
>
>     and tune-cortex.inc will have things like:
>
>     ----
>     DEFAULTTUNE ?= "armv7a-neon"
>
>     require conf/machine/include/arm/arch-armv7a.inc
>
>     TUNEVALID[cortex${CORTEX_ID}] = "Enable Cortex-${CORTEX_NAME} specific
>     processor optimizations"
>     TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES",
>     "cortex${CORTEX_ID}", " -mtune=cortex-${CORTEX_ID}", "", d)}"
>
>     # Little Endian base configs
>     AVAILTUNES += "cortex${CORTEX_ID} cortex${CORTEX_ID}t
>     cortex${CORTEX_ID}-neon cortex${CORTEX_ID}t-neon"
>     ARMPKGARCH_tune-cortex${CORTEX_ID} = "cortex${CORTEX_ID}"
>     ARMPKGARCH_tune-cortex${CORTEX_ID}t = "cortex${CORTEX_ID}"
>     ARMPKGARCH_tune-cortex${CORTEX_ID}-neon = "cortex${CORTEX_ID}"
>     ARMPKGARCH_tune-cortex${CORTEX_ID}t-neon = "cortex${CORTEX_ID}"
>     TUNE_FEATURES_tune-cortex${CORTEX_ID} = "${TUNE_FEATURES_tune-armv7a}
>     cortex${CORTEX_ID}"
>     TUNE_FEATURES_tune-cortex${CORTEX_ID}t = "${TUNE_FEATURES_tune-armv7at}
>     cortex${CORTEX_ID}"
>     TUNE_FEATURES_tune-cortex${CORTEX_ID}-neon =
>     "${TUNE_FEATURES_tune-armv7a-neon} cortex${CORTEX_ID}"
>     TUNE_FEATURES_tune-cortex${CORTEX_ID}t-neon =
>     "${TUNE_FEATURES_tune-armv7at-neon} cortex${CORTEX_ID}"
>     PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID} =
>     "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortex${CORTEX_ID}-vfp"
>     PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}t =
>     "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortex${CORTEX_ID}-vfp
>     cortex${CORTEX_ID}t2-vfp"
>     PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}-neon =
>     "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortex${CORTEX_ID}-vfp
>     cortex${CORTEX_ID}-vfp-neon"
>     PACKAGE_EXTRA_ARCHS_tune-cortex${CORTEX_ID}t-neon =
>     "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortex${CORTEX_ID}-vfp
>     cortex${CORTEX_ID}-vfp-neon cortex${CORTEX_ID}t2-vfp
>     cortex${CORTEX_ID}t2-vfp-neon"
>
>     [..]
>     -----
>
>     What do you think?
>
>
> I fully agree :-)

Works for me.  Just be sure to document the new variables in the arm/README file.

--Mark

> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br http://projetos.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/conf/machine/include/tune-cortexa5.inc b/meta/conf/machine/include/tune-cortexa5.inc
new file mode 100644
index 0000000..139e65c
--- /dev/null
+++ b/meta/conf/machine/include/tune-cortexa5.inc
@@ -0,0 +1,36 @@ 
+DEFAULTTUNE ?= "armv7a-neon"
+
+require conf/machine/include/arm/arch-armv7a.inc
+
+TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa5", " -mtune=cortex-a5", "", d)}"
+
+# Little Endian base configs
+AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"
+ARMPKGARCH_tune-cortexa5 = "cortexa5"
+ARMPKGARCH_tune-cortexa5t = "cortexa5"
+ARMPKGARCH_tune-cortexa5-neon = "cortexa5"
+ARMPKGARCH_tune-cortexa5t-neon = "cortexa5"
+TUNE_FEATURES_tune-cortexa5 = "${TUNE_FEATURES_tune-armv7a} cortexa5"
+TUNE_FEATURES_tune-cortexa5t = "${TUNE_FEATURES_tune-armv7at} cortexa5"
+TUNE_FEATURES_tune-cortexa5-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa5"
+TUNE_FEATURES_tune-cortexa5t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa5"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa5-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa5-vfp cortexa5t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa5-vfp cortexa5-vfp-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa5-vfp cortexa5-vfp-neon cortexa5t2-vfp cortexa5t2-vfp-neon"
+
+# VFP Tunes
+AVAILTUNES += "cortexa5hf cortexa5thf cortexa5hf-neon cortexa5thf-neon"
+ARMPKGARCH_tune-cortexa5hf = "cortexa5"
+ARMPKGARCH_tune-cortexa5thf = "cortexa5"
+ARMPKGARCH_tune-cortexa5hf-neon = "cortexa5"
+ARMPKGARCH_tune-cortexa5thf-neon = "cortexa5"
+TUNE_FEATURES_tune-cortexa5hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa5"
+TUNE_FEATURES_tune-cortexa5thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa5"
+TUNE_FEATURES_tune-cortexa5hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa5"
+TUNE_FEATURES_tune-cortexa5thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa5"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa5hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa5hf-vfp cortexa5t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa5hf-vfp cortexa5hf-vfp-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa5hf-vfp cortexa5hf-vfp-neon cortexa5t2hf-vfp cortexa5t2hf-vfp-neon"