summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc/curve25519/curve25519-arm-glue.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-23 03:53:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-23 17:05:23 +0200
commit94549a595c7ff6a2040d11009b14576c64ee9b88 (patch)
treea0f41bed7257c873b9561b37888c45e600dbd334 /src/crypto/zinc/curve25519/curve25519-arm-glue.h
parentdad4e5d2e29f3e19f95982bf3e468f0f965379ce (diff)
crypto-arm: rework KERNEL_MODE_NEON handling again
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/curve25519/curve25519-arm-glue.h')
-rw-r--r--src/crypto/zinc/curve25519/curve25519-arm-glue.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/crypto/zinc/curve25519/curve25519-arm-glue.h b/src/crypto/zinc/curve25519/curve25519-arm-glue.h
index e9496b0..6b20931 100644
--- a/src/crypto/zinc/curve25519/curve25519-arm-glue.h
+++ b/src/crypto/zinc/curve25519/curve25519-arm-glue.h
@@ -7,12 +7,7 @@
#include <asm/neon.h>
#include <asm/simd.h>
-#define ARM_USE_NEON (defined(CONFIG_KERNEL_MODE_NEON) && \
- (defined(CONFIG_ARM64) || \
- (defined(__LINUX_ARM_ARCH__) && \
- __LINUX_ARM_ARCH__ == 7)))
-
-#if ARM_USE_NEON
+#if defined(CONFIG_KERNEL_MODE_NEON)
asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_POINT_SIZE],
const u8 secret[CURVE25519_POINT_SIZE],
const u8 basepoint[CURVE25519_POINT_SIZE]);
@@ -29,7 +24,7 @@ static inline bool curve25519_arch(u8 mypublic[CURVE25519_POINT_SIZE],
const u8 secret[CURVE25519_POINT_SIZE],
const u8 basepoint[CURVE25519_POINT_SIZE])
{
-#if ARM_USE_NEON
+#if defined(CONFIG_KERNEL_MODE_NEON)
if (curve25519_use_neon && may_use_simd()) {
kernel_neon_begin();
curve25519_neon(mypublic, secret, basepoint);