Remove the last of the broken NEON workaround
All evidence we have points to these devices no longer existing (or at
least no longer taking updates) for years.
I've kept CRYPTO_has_broken_NEON around for now as there are some older
copies of the Chromium measurement code around, but now the function
always returns zero.
Change-Id: Ib76b68e347749d03611d00caecb6b8b1fdbb37b1
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/56765
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/crypto/cpu_arm_linux.c b/crypto/cpu_arm_linux.c
index 67e6a1b..25b50f6 100644
--- a/crypto/cpu_arm_linux.c
+++ b/crypto/cpu_arm_linux.c
@@ -144,13 +144,12 @@
extern uint32_t OPENSSL_armcap_P;
-static int g_has_broken_neon, g_needs_hwcap2_workaround;
+static int g_needs_hwcap2_workaround;
void OPENSSL_cpuid_setup(void) {
// We ignore the return value of |read_file| and proceed with an empty
// /proc/cpuinfo on error. If |getauxval| works, we will still detect
- // capabilities. There may be a false positive due to
- // |crypto_cpuinfo_has_broken_neon|, but this is now rare.
+ // capabilities.
char *cpuinfo_data = NULL;
size_t cpuinfo_len = 0;
read_file(&cpuinfo_data, &cpuinfo_len, "/proc/cpuinfo");
@@ -176,18 +175,6 @@
hwcap = crypto_get_arm_hwcap_from_cpuinfo(&cpuinfo);
}
- // Clear NEON support if known broken. Note, if NEON is available statically,
- // the non-NEON code is dropped and this workaround is a no-op.
- //
- // TODO(davidben): The Android NDK now builds with NEON statically available
- // by default. Cronet still has some consumers that support NEON-less devices
- // (b/150371744). Get metrics on whether they still see this CPU and, if not,
- // remove this check entirely.
- g_has_broken_neon = crypto_cpuinfo_has_broken_neon(&cpuinfo);
- if (g_has_broken_neon) {
- hwcap &= ~HWCAP_NEON;
- }
-
// Matching OpenSSL, only report other features if NEON is present.
if (hwcap & HWCAP_NEON) {
OPENSSL_armcap_P |= ARMV7_NEON;
@@ -223,7 +210,7 @@
OPENSSL_free(cpuinfo_data);
}
-int CRYPTO_has_broken_NEON(void) { return g_has_broken_neon; }
+int CRYPTO_has_broken_NEON(void) { return 0; }
int CRYPTO_needs_hwcap2_workaround(void) { return g_needs_hwcap2_workaround; }