Re: [OE-core] [PATCH][master][RESEND 11/15] feature-arm-{neon, vfp}.inc: refactor and fix issues

2015-12-18 Thread Martin Jansa
On Thu, Dec 10, 2015 at 01:14:25PM -0800, Khem Raj wrote:
> 
> > On Dec 10, 2015, at 5:48 AM, Martin Jansa  wrote:
> > 
> > * respect all 4 vfp options ('vfp', 'vfpv3d16', 'vfpv3', 'vfpv4') when
> >  setting -mfloat-abi and ARMPKGSFX_EABI, without this change it wasn't
> >  possible to use call-convention hard together with vfpv4
> > * move 'vfpv3d16', 'vfpv3', 'vfpv4' support from
> >  feature-arm-vfp.inc
> >  to
> >  feature-arm-neon.inc
> 
> may be this should be other way around semantically, what does vip file has

But that would include them and mark as valid for armv5 as said below.

> >  the main difference is that feature-arm-vfp.inc is included in
> >  arch-armv5.inc while feature-arm-neon.inc only in armv7*.inc, so
> >  these options should be added to TUNEVALID also only for armv7*
> >  MACHINEs.
> > * support vfpv4 with or without neon
> >  when both vfpv4 and neon are in TUNE_FEATURES we want to set only one
> >  -mfpu parameter and to neon-vfpv4
> > * prevent multiple appends to ARMPKGSFX_FPU, we don't want to include
> >  e.g. -vfp as well as -vfpv4 when both "vfp" and "vfpv4" are in
> >  TUNE_FEATURES
> > * add -mfpu=vfp for tunes with "vfp" in TUNE_FEATURES - before that we
> >  were only adding -vfp to ARMPKGSFX_FPU
> > * add TUNE_CCARGS_MFPU variable which is used to set -mfpu parameter as
> >  well as ARMPKGSFX_FPU suffix in TUNE_PKGARCH, all enabled values are
> >  appended to it based on TUNE_FEATURES and then the last one is used
> >  in the actual param and suffix
> > * this prevents multiple -mfpu options in TUNE_CCARGS
> > 
> > * !!!
> >  This means we need to change TUNE_PKGARCH and PACKAGE_EXTRA_ARCHS for
> >  vfpv4, vfpv3d16, vfpv3 tunes, because the -vfp* isn't prependend
> >  multiple times. If you're using one of these new DEFAULTTUNES (which
> >  were at least partially broken anyway) and depend on working binary
> >  package feed upgrade-path, then don't forget to migrate PR service
> >  database to new TUNE_PKGARCH.
> > 
> > Signed-off-by: Martin Jansa 
> > ---
> > meta/conf/machine/include/arm/arch-armv7a.inc  | 64 
> > +++---
> > meta/conf/machine/include/arm/feature-arm-neon.inc | 19 ++-
> > meta/conf/machine/include/arm/feature-arm-vfp.inc  | 22 +++-
> > meta/conf/machine/include/tune-cortexa15.inc   |  8 +--
> > meta/conf/machine/include/tune-cortexa17.inc   |  8 +--
> > meta/conf/machine/include/tune-cortexa5.inc|  8 +--
> > meta/conf/machine/include/tune-cortexa7.inc| 12 ++--
> > meta/conf/machine/include/tune-cortexa8.inc|  8 +--
> > meta/conf/machine/include/tune-cortexa9.inc|  8 +--
> > 9 files changed, 84 insertions(+), 73 deletions(-)
> > 
> > diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc 
> > b/meta/conf/machine/include/arm/arch-armv7a.inc
> > index 0c6e755..1f2e071 100644
> > --- a/meta/conf/machine/include/arm/arch-armv7a.inc
> > +++ b/meta/conf/machine/include/arm/arch-armv7a.inc
> > @@ -32,14 +32,14 @@ TUNE_FEATURES_tune-armv7a-neon-vfpv4  = 
> > "${TUNE_FEATURES_tune-armv7a-neon}  vfpv
> > TUNE_FEATURES_tune-armv7at-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon} 
> > vfpv4"
> > PACKAGE_EXTRA_ARCHS_tune-armv7a = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv6}  armv7a armv7a-vfp"
> > PACKAGE_EXTRA_ARCHS_tune-armv7at= 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7a armv7a-vfp armv7at2-vfp"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16= 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfp-vfpv3d16"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16   = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-vfpv3d16 
> > armv7at2-vfp-vfpv3d16"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3   = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16}  armv7a-vfp-vfpv3d16-vfpv3"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3  = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfp-vfpv3d16-vfpv3 
> > armv7at2-vfp-vfpv3d16-vfpv3"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7a-neon= 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfp-neon"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7at-neon   = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-neon armv7at2-vfp-neon"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4  = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}  armv7a-vfp-neon-vfpv4"
> > -PACKAGE_EXTRA_ARCHS_tune-armv7at-neon-vfpv4 = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} armv7a-vfp-neon-vfpv4 
> > armv7at2-vfp-neon-vfpv4"
> > +PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16= 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfpv3d16"
> > +PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16   = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfpv3d16 armv7at2-vfpv3d16"
> > +PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3   = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16}  armv7a-vfpv3"
> > +PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3  = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfpv3 armv7at2-vfpv3"
> > 

Re: [OE-core] [PATCH][master][RESEND 11/15] feature-arm-{neon, vfp}.inc: refactor and fix issues

2015-12-10 Thread Khem Raj

> On Dec 10, 2015, at 5:48 AM, Martin Jansa  wrote:
> 
> * respect all 4 vfp options ('vfp', 'vfpv3d16', 'vfpv3', 'vfpv4') when
>  setting -mfloat-abi and ARMPKGSFX_EABI, without this change it wasn't
>  possible to use call-convention hard together with vfpv4
> * move 'vfpv3d16', 'vfpv3', 'vfpv4' support from
>  feature-arm-vfp.inc
>  to
>  feature-arm-neon.inc

may be this should be other way around semantically, what does vip file has

>  the main difference is that feature-arm-vfp.inc is included in
>  arch-armv5.inc while feature-arm-neon.inc only in armv7*.inc, so
>  these options should be added to TUNEVALID also only for armv7*
>  MACHINEs.
> * support vfpv4 with or without neon
>  when both vfpv4 and neon are in TUNE_FEATURES we want to set only one
>  -mfpu parameter and to neon-vfpv4
> * prevent multiple appends to ARMPKGSFX_FPU, we don't want to include
>  e.g. -vfp as well as -vfpv4 when both "vfp" and "vfpv4" are in
>  TUNE_FEATURES
> * add -mfpu=vfp for tunes with "vfp" in TUNE_FEATURES - before that we
>  were only adding -vfp to ARMPKGSFX_FPU
> * add TUNE_CCARGS_MFPU variable which is used to set -mfpu parameter as
>  well as ARMPKGSFX_FPU suffix in TUNE_PKGARCH, all enabled values are
>  appended to it based on TUNE_FEATURES and then the last one is used
>  in the actual param and suffix
> * this prevents multiple -mfpu options in TUNE_CCARGS
> 
> * !!!
>  This means we need to change TUNE_PKGARCH and PACKAGE_EXTRA_ARCHS for
>  vfpv4, vfpv3d16, vfpv3 tunes, because the -vfp* isn't prependend
>  multiple times. If you're using one of these new DEFAULTTUNES (which
>  were at least partially broken anyway) and depend on working binary
>  package feed upgrade-path, then don't forget to migrate PR service
>  database to new TUNE_PKGARCH.
> 
> Signed-off-by: Martin Jansa 
> ---
> meta/conf/machine/include/arm/arch-armv7a.inc  | 64 +++---
> meta/conf/machine/include/arm/feature-arm-neon.inc | 19 ++-
> meta/conf/machine/include/arm/feature-arm-vfp.inc  | 22 +++-
> meta/conf/machine/include/tune-cortexa15.inc   |  8 +--
> meta/conf/machine/include/tune-cortexa17.inc   |  8 +--
> meta/conf/machine/include/tune-cortexa5.inc|  8 +--
> meta/conf/machine/include/tune-cortexa7.inc| 12 ++--
> meta/conf/machine/include/tune-cortexa8.inc|  8 +--
> meta/conf/machine/include/tune-cortexa9.inc|  8 +--
> 9 files changed, 84 insertions(+), 73 deletions(-)
> 
> diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc 
> b/meta/conf/machine/include/arm/arch-armv7a.inc
> index 0c6e755..1f2e071 100644
> --- a/meta/conf/machine/include/arm/arch-armv7a.inc
> +++ b/meta/conf/machine/include/arm/arch-armv7a.inc
> @@ -32,14 +32,14 @@ TUNE_FEATURES_tune-armv7a-neon-vfpv4  = 
> "${TUNE_FEATURES_tune-armv7a-neon}  vfpv
> TUNE_FEATURES_tune-armv7at-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon} 
> vfpv4"
> PACKAGE_EXTRA_ARCHS_tune-armv7a = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv6}  armv7a armv7a-vfp"
> PACKAGE_EXTRA_ARCHS_tune-armv7at= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7a armv7a-vfp armv7at2-vfp"
> -PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfp-vfpv3d16"
> -PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16   = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-vfpv3d16 
> armv7at2-vfp-vfpv3d16"
> -PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3   = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16}  armv7a-vfp-vfpv3d16-vfpv3"
> -PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3  = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfp-vfpv3d16-vfpv3 
> armv7at2-vfp-vfpv3d16-vfpv3"
> -PACKAGE_EXTRA_ARCHS_tune-armv7a-neon= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfp-neon"
> -PACKAGE_EXTRA_ARCHS_tune-armv7at-neon   = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-neon armv7at2-vfp-neon"
> -PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4  = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}  armv7a-vfp-neon-vfpv4"
> -PACKAGE_EXTRA_ARCHS_tune-armv7at-neon-vfpv4 = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} armv7a-vfp-neon-vfpv4 
> armv7at2-vfp-neon-vfpv4"
> +PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfpv3d16"
> +PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16   = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfpv3d16 armv7at2-vfpv3d16"
> +PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3   = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16}  armv7a-vfpv3"
> +PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3  = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfpv3 armv7at2-vfpv3"
> +PACKAGE_EXTRA_ARCHS_tune-armv7a-neon= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-neon"
> +PACKAGE_EXTRA_ARCHS_tune-armv7at-neon   = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-neon armv7at2-neon"
> +PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4  = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}