Revert "feature-arm-crypto: Add +nocrypto to -mcpu when crypto not in features"
PATCH 1/2 Revert "feature-arm-crypto: Add +nocrypto to -mcpu when crypto not in features"
This reverts commit db1b355b2b15ba57bd89c2dfb88c2c667551863e.
--- meta/conf/machine/include/arm/feature-arm-crypto.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/conf/machine/include/arm/feature-arm-crypto.inc +1 -2
@@ -2,5 +2,4 @@ # armv8-a, armv8.1-a, armv8.3-a, armv8.4-a, armv8.5-a, armv8.6-a, and armv8-r TUNEVALID[crypto] = "Enable cryptographic instructions for ARMv8" -# See https://github.com/llvm/llvm-project/issues/85699 -TUNE_CCARGS_MARCH_OPTS .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '+nocrypto', d)}" +TUNE_CCARGS_MARCH_OPTS .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '', d)}"
Signature · 1 line
2.39.5
PATCH 2/2 arm: add nocrypto TUNE_FEATURE to complement crypto
Add a nocrypto TUNE_FEATURE option to feature-arm-crypto.inc to explicitly disable ARM crypto extensions via GCC flags. This provides an opposing state to the existing crypto feature, enabling more explicit control over crypto-related tuning.
Some vendors ship cores without crypto support, and this change allows disabling it without requiring extensive audits of dependent code paths. This approach avoids the knock-on effects caused when nocrypto is applied implicitly in the absence of crypto in TUNE_FEATURES.
TUNECONFLICTS was added to prevent both features from being enabled simultaneously. When both are added, the following error is seen during build:
Feature 'nocrypto' conflicts with 'crypto'.
Feature 'crypto' conflicts with 'nocrypto'.
--- meta/conf/machine/include/arm/feature-arm-crypto.inc | 5 +++++ 1 file changed, 5 insertions(+)
meta/conf/machine/include/arm/feature-arm-crypto.inc +5 -0
@@ -3,3 +3,8 @@ TUNEVALID[crypto] = "Enable cryptographic instructions for ARMv8" TUNE_CCARGS_MARCH_OPTS .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '', d)}" +TUNECONFLICTS[crypto] = "nocrypto" + +TUNEVALID[nocrypto] = "Disable cryptographic instructions for ARMv8" +TUNE_CCARGS_MARCH_OPTS .= "${@bb.utils.contains('TUNE_FEATURES', 'nocrypto', '+nocrypto', '', d)}" +TUNECONFLICTS[nocrypto] = "crypto"
Signature · 1 line
2.39.5
Re: [PATCH 2/2] arm: add nocrypto TUNE_FEATURE to complement crypto
Quoted 12 lines · Jon Mason
Add a
nocryptoTUNE_FEATUREoption tofeature-arm-crypto.incto explicitly disable ARM crypto extensions via GCC flags. This provides an opposing state to the existingcryptofeature, enabling more explicit control over crypto-related tuning.Some vendors ship cores without crypto support, and this change allows disabling it without requiring extensive audits of dependent code paths. This approach avoids the knock-on effects caused when
nocryptois applied implicitly in the absence ofcryptoinTUNE_FEATURES.
Quoted 7 lines
TUNECONFLICTS was added to prevent both features from being enabled simultaneously. When both are added, the following error is seen during build:
Feature 'nocrypto' conflicts with 'crypto'.
Feature 'crypto' conflicts with 'nocrypto'.
This looks fine to me. We need to add additional tunes in the cortexa72 tune file to have a tune using it.
Quoted 23 lines
Signed-off-by Jon Mason <[email protected]>Cc Ryan Eatmon <[email protected]>Cc Khem Raj <[email protected]>--- meta/conf/machine/include/arm/feature-arm-crypto.inc | 5 +++++ 1 file changed, 5 insertions(+)meta/conf/machine/include/arm/feature-arm-crypto.inc +5
-1@@ -3,3 +3,8 @@ TUNEVALID[crypto] = "Enable cryptographic instructions for ARMv8" TUNE_CCARGS_MARCH_OPTS .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '', d)}" +TUNECONFLICTS[crypto] = "nocrypto" + +TUNEVALID[nocrypto] = "Disable cryptographic instructions for ARMv8" +TUNE_CCARGS_MARCH_OPTS .= "${@bb.utils.contains('TUNE_FEATURES', 'nocrypto', '+nocrypto', '', d)}" +TUNECONFLICTS[nocrypto] = "crypto" --2.39.5