diff options
Diffstat (limited to 'src/crypto/zinc/curve25519')
-rw-r--r-- | src/crypto/zinc/curve25519/curve25519-arm-glue.h | 9 | ||||
-rw-r--r-- | src/crypto/zinc/curve25519/curve25519-arm.S | 4 |
2 files changed, 4 insertions, 9 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); diff --git a/src/crypto/zinc/curve25519/curve25519-arm.S b/src/crypto/zinc/curve25519/curve25519-arm.S index 01cb4ad..db6570c 100644 --- a/src/crypto/zinc/curve25519/curve25519-arm.S +++ b/src/crypto/zinc/curve25519/curve25519-arm.S @@ -7,11 +7,12 @@ * but has subsequently been manually reworked for use in kernel space. */ -#if IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && __LINUX_ARM_ARCH__ == 7 +#ifdef CONFIG_KERNEL_MODE_NEON #include <linux/linkage.h> .text .fpu neon +.arch armv7-a .align 4 ENTRY(curve25519_neon) @@ -2091,5 +2092,4 @@ ENTRY(curve25519_neon) mov sp, ip pop {r4-r11, pc} ENDPROC(curve25519_neon) - #endif |