Updates for ARM tunings
cover Updates for ARM tunings
From: Mark Hatle <[email protected]>
cortexa78 missing seems to be an oversight. It (according to wikipedia) is a successor to the cortexa77 which already exists. This was created by copying the cortexa77 and changing it to be a78. A test system was build to verify no obvious issues with the toolchain.
The remaining three changes are related. I've got a need for a cortex-r5 and cortex-r52 that enables the hard-float calling convention (this might also be useful to others with other cortex-r and maybe even cortex-m processors, but I'm not in a position to know this outside of my specific need.)
tune-cortexr5 simply adds an hf variant that adds the callconvention-hard. Since there is no armv7r-vfp3d16 w/ this, the package_arch list is more limited then the regular r5.
tune-cortexr52 requires the change to feature-arm-vfp to allow the setting when 'simd' is enabled (since we don't specify vfp or neon). Otherwise this follows the same convention as the r5 change.
Mark Hatle (4):
tune-cortexa78.inc: Add cortexa78 tune, based on cortexa77 feature-arm-vfp.inc: Allow hard-float on newer simd targets
tune-cortexr5: Add hard-float variant
tune-cortexr52: Add hard-float variant
.../machine/include/arm/armv7r/tune-cortexr5.inc | 5 +++++ .../include/arm/armv8-2a/tune-cortexa78.inc | 16 ++++++++++++++++ .../include/arm/armv8r/tune-cortexr52.inc | 5 +++++ .../conf/machine/include/arm/feature-arm-vfp.inc | 3 ++- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc
Signature · 1 line
2.34.1
PATCH 1/4 tune-cortexa78.inc: Add cortexa78 tune, based on cortexa77
From: Mark Hatle <[email protected]>
--- .../include/arm/armv8-2a/tune-cortexa78.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc
meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc new file +16 -0
@@ -0,0 +1,16 @@ +# +# Tune Settings for Cortex-A78 +# +DEFAULTTUNE ?= "cortexa78" + +TUNEVALID[cortexa78] = "Enable Cortex-A78 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa78', ' -mcpu=cortex-a78', '', d)}" + +require conf/machine/include/arm/arch-armv8-2a.inc + +# Little Endian base configs +AVAILTUNES += "cortexa78" +ARMPKGARCH:tune-cortexa78 = "cortexa78" +TUNE_FEATURES:tune-cortexa78 = "${TUNE_FEATURES:tune-armv8-2a-crypto} cortexa78" +PACKAGE_EXTRA_ARCHS:tune-cortexa78 = "${PACKAGE_EXTRA_ARCHS:tune-armv8-2a-crypto} cortexa78" +BASE_LIB:tune-cortexa78 = "lib64"
Signature · 1 line
2.34.1
Re: [OE-core] [PATCH 1/4] tune-cortexa78.inc: Add cortexa78 tune, based on cortexa77
Quoted 20 lines · Mark Hatle
From: Mark Hatle <[email protected]>
Signed-off-by Mark Hatle <[email protected]>Signed-off-by Mark Hatle <[email protected]>--- .../include/arm/armv8-2a/tune-cortexa78.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.incmeta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc new file +4
-0@@ -0,0 +1,16 @@ +# +# Tune Settings for Cortex-A78 +# +DEFAULTTUNE ?= "cortexa78"
meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc line 14
Quoted 10 lines
meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc new file +10
-0+ +TUNEVALID[cortexa78] = "Enable Cortex-A78 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa78', ' -mcpu=cortex-a78', '', d)}" + +require conf/machine/include/arm/arch-armv8-2a.inc + +# Little Endian base configs +AVAILTUNES += "cortexa78" +ARMPKGARCH:tune-cortexa78 = "cortexa78" +TUNE_FEATURES:tune-cortexa78 = "${TUNE_FEATURES:tune-armv8-2a-crypto} cortexa78"
I think this should be set to "aarch64 crypto cortexa78" inline with patch I sent last week [1], otherwise it looks ok.
[1] https://lore.kernel.org/openembedded-core/[email protected]/
Re: [OE-core] [PATCH 1/4] tune-cortexa78.inc: Add cortexa78 tune, based on cortexa77
It should be the same as the cortexa77.inc file, but say 78.. So I've no problems with that change if it's in master.
--Mark
Quoted 48 lines · Khem Raj
Quoted 20 lines · Mark Hatle
From: Mark Hatle <[email protected]>
Signed-off-by Mark Hatle <[email protected]>Signed-off-by Mark Hatle <[email protected]>--- .../include/arm/armv8-2a/tune-cortexa78.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)create mode 100644 meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc
meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc new file +4
-0@@ -0,0 +1,16 @@ +# +# Tune Settings for Cortex-A78 +# +DEFAULTTUNE ?= "cortexa78"meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc line 14
Quoted 10 lines
meta/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc new file +10
-0+ +TUNEVALID[cortexa78] = "Enable Cortex-A78 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa78', ' -mcpu=cortex-a78', '', d)}" + +require conf/machine/include/arm/arch-armv8-2a.inc + +# Little Endian base configs +AVAILTUNES += "cortexa78" +ARMPKGARCH:tune-cortexa78 = "cortexa78" +TUNE_FEATURES:tune-cortexa78 = "${TUNE_FEATURES:tune-armv8-2a-crypto} cortexa78"I think this should be set to "aarch64 crypto cortexa78" inline with patch I sent last week [1], otherwise it looks ok.
[1] https://lore.kernel.org/openembedded-core/[email protected]/
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194545): https://lists.openembedded.org/g/openembedded-core/message/194545
Mute This Topic: https://lists.openembedded.org/mt/104086355/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 2/4 feature-arm-vfp.inc: Allow hard-float on newer simd targets
In reply to Mark HatleFrom: Mark Hatle <[email protected]>
Currently hard-float is dependency upon the special TUNE_CCARGS_MFPU which contains custom -mfpu= values. However, newer 32-bit architectures like cortex-r52 use 'simd' instead. There is no 'simd' entry for -mfpu= according to the GCC manual, it's more or less automatic based on the cpu settings.
Add this as an exception to the TUNE_CCARGS_FLOAT setting of hard or softfp.
--- meta/conf/machine/include/arm/feature-arm-vfp.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/machine/include/arm/feature-arm-vfp.inc +2 -1
@@ -5,11 +5,12 @@ TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit." TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}" +# simd is special, we don't pass this to the -mfpu, it's implied TUNE_CCARGS .= "${@ (' -mfpu=%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}" # The following deals with both vfpv3-d16 and vfpv4-d16 ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1].replace('-d16', 'd16')) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}" TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP." -TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '') else '' }" +TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }" TUNE_CCARGS .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}" ARMPKGSFX_EABI = "${@ 'hf' if (d.getVar('TUNE_CCARGS_MFLOAT') == 'hard') else ''}"
Signature · 1 line
2.34.1
PATCH 3/4 tune-cortexr5: Add hard-float variant
In reply to Mark HatleFrom: Mark Hatle <[email protected]>
Add the ability to specify cortexr5hf to get a version that enables the hard-float calling convention.
--- meta/conf/machine/include/arm/armv7r/tune-cortexr5.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta/conf/machine/include/arm/armv7r/tune-cortexr5.inc +5 -0
@@ -12,3 +12,8 @@ AVAILTUNES += "cortexr5" ARMPKGARCH:tune-cortexr5 = "cortexr5" TUNE_FEATURES:tune-cortexr5 = "${TUNE_FEATURES:tune-armv7r-vfpv3d16} cortexr5 idiv" PACKAGE_EXTRA_ARCHS:tune-cortexr5 = "${PACKAGE_EXTRA_ARCHS:tune-armv7r-vfpv3d16} cortexr5-vfpv3d16" + +AVAILTUNES += "cortexr5hf" +ARMPKGARCH:tune-cortexr5hf = "cortexr5" +TUNE_FEATURES:tune-cortexr5hf = "${TUNE_FEATURES:tune-cortexr5} callconvention-hard" +PACKAGE_EXTRA_ARCHS:tune-cortexr5hf = "cortexr5hf-vfpv3d16"
Signature · 1 line
2.34.1
PATCH 4/4 tune-cortexr52: Add hard-float variant
In reply to Mark HatleFrom: Mark Hatle <[email protected]>
Add the ability to specify cortexr52hf to get a version that enables the hard-float calling convention.
--- meta/conf/machine/include/arm/armv8r/tune-cortexr52.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta/conf/machine/include/arm/armv8r/tune-cortexr52.inc +5 -0
@@ -12,3 +12,8 @@ AVAILTUNES += "cortexr52" ARMPKGARCH:tune-cortexr52 = "cortexr52" TUNE_FEATURES:tune-cortexr52 = "${TUNE_FEATURES:tune-armv8r-crc-simd} cortexr52" PACKAGE_EXTRA_ARCHS:tune-cortexr52 = "${PACKAGE_EXTRA_ARCHS:tune-armv8r-crc-simd} cortexr52" + +AVAILTUNES += "cortexr52hf" +ARMPKGARCH:tune-cortexr52hf = "cortexr52" +TUNE_FEATURES:tune-cortexr52hf = "${TUNE_FEATURES:tune-cortexr52} callconvention-hard" +PACKAGE_EXTRA_ARCHS:tune-cortexr52hf = "cortexr52hf"
Signature · 1 line
2.34.1