tune-cortexa72: Drop the crypto extension from the cortexa72 tune
cover tune-cortexa72: Drop the crypto extension from the cortexa72 tune
Hi,
This patch series backport two patches from the master branch to fix the crash issue on some cortexa72 boards due to the crypto intructions are used.
Jagadeesh Krishnanjanappa (1):
tune-cortexa72: remove crypto for the default cortex-a72
Kevin Hao (1):
tune-cortexa72: Enable the crc extension by default for cortexa72
meta/conf/machine/include/tune-cortexa72.inc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/2 tune-cortexa72: remove crypto for the default cortex-a72
From: Jagadeesh Krishnanjanappa <[email protected]>
The cryptographic unit is optional for the Cortex-A72, but it was included by default previously. This breaks building systems that lack this functionality when using tune-cortexa72.inc.
To correct this, add a crypto entry in the tune file. Since CRC is optional for ARMv8.0, do the same thing while we're at it.
For platforms that had been happily using tune-cortexa72.inc, a slight degradation of performance will occur using the default. To correct this, simply add:
DEFAULTTUNE = "cortexa72-crc-crypto"
(From OE-Core rev: 2568d537087adb0b592aa250bf628a7b48c3a9d3)
--- meta/conf/machine/include/tune-cortexa72.inc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
meta/conf/machine/include/tune-cortexa72.inc +12 -4
@@ -6,8 +6,16 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa72', ' -mcpu=corte require conf/machine/include/arm/arch-armv8a.inc # Little Endian base configs -AVAILTUNES += "cortexa72" +AVAILTUNES += "cortexa72 cortexa72-crc cortexa72-crc-crypto" ARMPKGARCH_tune-cortexa72 = "cortexa72" -TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a-crc-crypto} cortexa72" -PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72" -BASE_LIB_tune-cortexa72 = "lib64" +ARMPKGARCH_tune-cortexa72-crc = "cortexa72" +ARMPKGARCH_tune-cortexa72-crc-crypto = "cortexa72" +TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a} cortexa72" +TUNE_FEATURES_tune-cortexa72-crc = "${TUNE_FEATURES_tune-cortexa72} crc" +TUNE_FEATURES_tune-cortexa72-crc-crypto = "${TUNE_FEATURES_tune-cortexa72} crc crypto" +PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8} cortexa72" +PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa72 cortexa72-crc" +PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72 cortexa72-crc cortexa72-crc-crypto" +BASE_LIB_tune-cortexa72 = "lib64" +BASE_LIB_tune-cortexa72-crc = "lib64" +BASE_LIB_tune-cortexa72-crc-crypto = "lib64"
Signature · 1 line
2.31.1
Re: [hardknott 1/2] tune-cortexa72: remove crypto for the default cortex-a72
Quoted 6 lines · Kevin Hao
From: Jagadeesh Krishnanjanappa <[email protected]>
The cryptographic unit is optional for the Cortex-A72, but it was included by default previously. This breaks building systems that lack this functionality when using tune-cortexa72.inc.
Quoted 9 lines
To correct this, add a crypto entry in the tune file. Since CRC is optional for ARMv8.0, do the same thing while we're at it.
For platforms that had been happily using tune-cortexa72.inc, a slight
degradation of performance will occur using the default. To correct this, simply add:
DEFAULTTUNE = "cortexa72-crc-crypto"
I am not very familiar with ARM tunes but it sounds like you are changing behaviour for people who might already be using these tunes with these two patches ... That might not be suitable for stable branches.
Perhaps Ross, Jon or others can comment if this is something that should be merged in stable branches.
Thanks,
Anuj
Quoted 48 lines
(From OE-Core rev:
2568d537087adb0b592aa250bf628a7b48c3a9d3)Signed-off-by Jagadeesh Krishnanjanappa <[email protected]>Signed-off-by Jon Mason <[email protected]> (rewording commitmessage)
Signed-off-by Richard Purdie <[email protected]>[Kevin: Convert to the old style override syntax]Signed-off-by Kevin Hao <[email protected]>---
meta/conf/machine/include/tune-cortexa72.inc | 16 ++++++++++++----1 file changed, 12 insertions(+), 4 deletions(-)meta/conf/machine/include/tune-cortexa72.inc +0
-0@@ -6,8 +6,16 @@ TUNE_CCARGS .="${@bb.utils.contains('TUNE_FEATURES', 'cortexa72', ' -mcpu=corte require conf/machine/include/arm/arch-armv8a.inc
# Little Endian base configsmeta/conf/machine/include/tune-cortexa72.inc +1
-1-AVAILTUNES += "cortexa72" +AVAILTUNES += "cortexa72 cortexa72-crc cortexa72-crc-crypto"ARMPKGARCH_tune-cortexa72 = "cortexa72" -TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune- armv8a-crc-crypto} cortexa72" -PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune- armv8a-crc-crypto} cortexa72"
meta/conf/machine/include/tune-cortexa72.inc +3
-1-BASE_LIB_tune-cortexa72 = "lib64" +ARMPKGARCH_tune-cortexa72-crc = "cortexa72" +ARMPKGARCH_tune-cortexa72-crc-crypto = "cortexa72" +TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a} cortexa72"
+TUNE_FEATURES_tune-cortexa72-crc = "${TUNE_FEATURES_tune- cortexa72} crc"
+TUNE_FEATURES_tune-cortexa72-crc-crypto = "${TUNE_FEATURES_tune- cortexa72} crc crypto" +PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8} cortexa72" +PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa72 cortexa72-crc" +PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72 cortexa72- crc cortexa72-crc-crypto"meta/conf/machine/include/tune-cortexa72.inc +3
-0+BASE_LIB_tune-cortexa72 = "lib64" +BASE_LIB_tune-cortexa72-crc = "lib64" +BASE_LIB_tune-cortexa72-crc-crypto = "lib64"
Re: [hardknott 1/2] tune-cortexa72: remove crypto for the default cortex-a72
Quoted 19 lines · Anuj
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 6 lines · Kevin Hao
From: Jagadeesh Krishnanjanappa <[email protected]>
The cryptographic unit is optional for the Cortex-A72, but it was included by default previously. This breaks building systems that lack this functionality when using tune-cortexa72.inc.
Quoted 9 lines
To correct this, add a crypto entry in the tune file. Since CRC is optional for ARMv8.0, do the same thing while we're at it.
For platforms that had been happily using tune-cortexa72.inc, a slight
degradation of performance will occur using the default. To correct this, simply add:
DEFAULTTUNE = "cortexa72-crc-crypto"
Quoted 4 lines
I am not very familiar with ARM tunes but it sounds like you are changing behaviour for people who might already be using these tunes with these two patches ... That might not be suitable for stable branches.
These two patches fix the application crash bug on the boards which have a cortexa72 core but don't have a crypto unit. IMHO they are definitely suitable for the stable branch. Yes, for the boards which do have a crypto unit, they would have to update their default tune to avoid the slight the degradation of performance.
Thanks,
Kevin
Quoted 57 lines
Perhaps Ross, Jon or others can comment if this is something that should be merged in stable branches.
Thanks,
Anuj
Quoted 48 lines
(From OE-Core rev:
2568d537087adb0b592aa250bf628a7b48c3a9d3)Signed-off-by Jagadeesh Krishnanjanappa <[email protected]>Signed-off-by Jon Mason <[email protected]> (rewording commitmessage)
Signed-off-by Richard Purdie <[email protected]>[Kevin: Convert to the old style override syntax]Signed-off-by Kevin Hao <[email protected]>--- meta/conf/machine/include/tune-cortexa72.inc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)meta/conf/machine/include/tune-cortexa72.inc +0
-0@@ -6,8 +6,16 @@ TUNE_CCARGS .="${@bb.utils.contains('TUNE_FEATURES', 'cortexa72', ' -mcpu=corte
require conf/machine/include/arm/arch-armv8a.inc# Little Endian base configs
meta/conf/machine/include/tune-cortexa72.inc +1
-2-AVAILTUNES += "cortexa72" +AVAILTUNES += "cortexa72 cortexa72-crc cortexa72-crc-crypto" ARMPKGARCH_tune-cortexa72 = "cortexa72" -TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a-crc-crypto} cortexa72"
-PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-
armv8a-crc-crypto} cortexa72"meta/conf/machine/include/tune-cortexa72.inc +3
-1-BASE_LIB_tune-cortexa72 = "lib64" +ARMPKGARCH_tune-cortexa72-crc = "cortexa72" +ARMPKGARCH_tune-cortexa72-crc-crypto = "cortexa72" +TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a} cortexa72"
+TUNE_FEATURES_tune-cortexa72-crc = "${TUNE_FEATURES_tune-
cortexa72} crc"
+TUNE_FEATURES_tune-cortexa72-crc-crypto = "${TUNE_FEATURES_tune-
cortexa72} crc crypto"
+PACKAGE_EXTRA_ARCHS_tune-cortexa72 =
"${PACKAGE_EXTRA_ARCHS_tune-armv8} cortexa72"
+PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc =
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa72 cortexa72-crc"
+PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc-crypto =
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72 cortexa72- crc cortexa72-crc-crypto"meta/conf/machine/include/tune-cortexa72.inc +3
-0+BASE_LIB_tune-cortexa72 = "lib64" +BASE_LIB_tune-cortexa72-crc = "lib64" +BASE_LIB_tune-cortexa72-crc-crypto = "lib64"
Re: [OE-core] [hardknott 1/2] tune-cortexa72: remove crypto for the default cortex-a72
In reply to Mittal, AnujQuoted 17 lines · Anuj Mittal
Quoted 6 lines · Kevin Hao
From: Jagadeesh Krishnanjanappa <[email protected]>
The cryptographic unit is optional for the Cortex-A72, but it was included by default previously. This breaks building systems that lack this functionality when using tune-cortexa72.inc.
Quoted 9 lines
To correct this, add a crypto entry in the tune file. Since CRC is optional for ARMv8.0, do the same thing while we're at it.
For platforms that had been happily using tune-cortexa72.inc, a slight
degradation of performance will occur using the default. To correct this, simply add:
DEFAULTTUNE = "cortexa72-crc-crypto"
Quoted 7 lines
I am not very familiar with ARM tunes but it sounds like you are changing behaviour for people who might already be using these tunes with these two patches ... That might not be suitable for stable branches.
Perhaps Ross, Jon or others can comment if this is something that should be merged in stable branches.
You're right to be nervous of the change, I was with master. Having looked into the issue, it is a serious one and probably should be fixed.
That said, I think there is perhaps a patch missing from this series, the one which removes the cortexa72-crc tune. I think this is fine even for a stable series since the patch adding it is also in this series. The patches do make more sense once looked at as a whole, we just didn't get this quite right for master at first.
Cheers,
Richard
Re: [OE-core] [hardknott 1/2] tune-cortexa72: remove crypto for the default cortex-a72
Quoted 25 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 22 lines · Anuj Mittal
Quoted 6 lines · Kevin Hao
From: Jagadeesh Krishnanjanappa <[email protected]>
The cryptographic unit is optional for the Cortex-A72, but it was included by default previously. This breaks building systems that lack this functionality when using tune-cortexa72.inc.
Quoted 9 lines
To correct this, add a crypto entry in the tune file. Since CRC is optional for ARMv8.0, do the same thing while we're at it.
For platforms that had been happily using tune-cortexa72.inc, a slight
degradation of performance will occur using the default. To correct this, simply add:
DEFAULTTUNE = "cortexa72-crc-crypto"I am not very familiar with ARM tunes but it sounds like you are changing behaviour for people who might already be using these tunes with these two patches ... That might not be suitable for stable branches.
Quoted 8 lines
Quoted 2 lines
Perhaps Ross, Jon or others can comment if this is something that should be merged in stable branches.
You're right to be nervous of the change, I was with master. Having looked into the issue, it is a serious one and probably should be fixed.
That said, I think there is perhaps a patch missing from this series, the one which removes the cortexa72-crc tune.
I dropped that patch intentionally since it doesn't fix any real issue and may be not suitable for the stable branch.
Quoted 3 lines
I think this is fine even for a stable
series since the patch adding it is also in this series. The patches do make more sense once looked at as a whole,
Faire enough, I will send a v2 to include that patch.
Thanks,
Kevin
Quoted 7 lines
we just didn't get this quite right for
master at first.Cheers,
Richard
PATCH 2/2 tune-cortexa72: Enable the crc extension by default for cortexa72
In reply to Kevin HaoThe crc extension is optional for the ARMv8.0 but is mandatory for the cortexa72, so there is no reason not to enable it for the cortexa72 tune. With this change, the cortexa72-crc seems redundant. But we had better to keep it to be compatible with the BSP which already used that tune.
(From OE-Core rev: ca50267ab568d2f688844cb7c6cd867ed34168db)
--- meta/conf/machine/include/tune-cortexa72.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
meta/conf/machine/include/tune-cortexa72.inc +6 -6
@@ -10,12 +10,12 @@ AVAILTUNES += "cortexa72 cortexa72-crc cortexa72-crc-crypto" ARMPKGARCH_tune-cortexa72 = "cortexa72" ARMPKGARCH_tune-cortexa72-crc = "cortexa72" ARMPKGARCH_tune-cortexa72-crc-crypto = "cortexa72" -TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a} cortexa72" -TUNE_FEATURES_tune-cortexa72-crc = "${TUNE_FEATURES_tune-cortexa72} crc" -TUNE_FEATURES_tune-cortexa72-crc-crypto = "${TUNE_FEATURES_tune-cortexa72} crc crypto" -PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8} cortexa72" -PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa72 cortexa72-crc" -PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72 cortexa72-crc cortexa72-crc-crypto" +TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a-crc} cortexa72" +TUNE_FEATURES_tune-cortexa72-crc = "${TUNE_FEATURES_tune-cortexa72}" +TUNE_FEATURES_tune-cortexa72-crc-crypto = "${TUNE_FEATURES_tune-cortexa72} crypto" +PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8-crc} cortexa72" +PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa72" +PACKAGE_EXTRA_ARCHS_tune-cortexa72-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72 cortexa72-crc-crypto" BASE_LIB_tune-cortexa72 = "lib64" BASE_LIB_tune-cortexa72-crc = "lib64" BASE_LIB_tune-cortexa72-crc-crypto = "lib64"
Signature · 1 line
2.31.1