diff options
Diffstat (limited to 'src/crypto/zinc/chacha20')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-arm-glue.h | 9 | ||||
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-arm.S | 2 | ||||
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-arm64.S | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-arm-glue.h b/src/crypto/zinc/chacha20/chacha20-arm-glue.h index 26fa4f2..1f1add0 100644 --- a/src/crypto/zinc/chacha20/chacha20-arm-glue.h +++ b/src/crypto/zinc/chacha20/chacha20-arm-glue.h @@ -10,17 +10,12 @@ #include <asm/cputype.h> #endif -#define ARM_USE_NEON (defined(CONFIG_KERNEL_MODE_NEON) && \ - (defined(CONFIG_ARM64) || \ - (defined(__LINUX_ARM_ARCH__) && \ - __LINUX_ARM_ARCH__ == 7))) - asmlinkage void chacha20_arm(u8 *out, const u8 *in, const size_t len, const u32 key[8], const u32 counter[4]); #if defined(CONFIG_ARM) asmlinkage void hchacha20_arm(const u32 state[16], u32 out[8]); #endif -#if ARM_USE_NEON +#if defined(CONFIG_KERNEL_MODE_NEON) asmlinkage void chacha20_neon(u8 *out, const u8 *in, const size_t len, const u32 key[8], const u32 counter[4]); #endif @@ -50,7 +45,7 @@ static inline bool chacha20_arch(struct chacha20_ctx *state, u8 *dst, const u8 *src, size_t len, simd_context_t *simd_context) { -#if ARM_USE_NEON +#if defined(CONFIG_KERNEL_MODE_NEON) if (chacha20_use_neon && len >= CHACHA20_BLOCK_SIZE * 3 && simd_use(simd_context)) chacha20_neon(dst, src, len, state->key, state->counter); diff --git a/src/crypto/zinc/chacha20/chacha20-arm.S b/src/crypto/zinc/chacha20/chacha20-arm.S index dec2eb6..7ac2e26 100644 --- a/src/crypto/zinc/chacha20/chacha20-arm.S +++ b/src/crypto/zinc/chacha20/chacha20-arm.S @@ -465,7 +465,7 @@ ENTRY(hchacha20_arm) pop {r4-r11,pc} ENDPROC(hchacha20_arm) -#if __LINUX_ARM_ARCH__ >= 7 && IS_ENABLED(CONFIG_KERNEL_MODE_NEON) +#ifdef CONFIG_KERNEL_MODE_NEON /* * This following NEON routine was ported from Andy Polyakov's implementation * from CRYPTOGAMS. It begins with parts of the CRYPTOGAMS scalar routine, diff --git a/src/crypto/zinc/chacha20/chacha20-arm64.S b/src/crypto/zinc/chacha20/chacha20-arm64.S index ba82286..1aeadab 100644 --- a/src/crypto/zinc/chacha20/chacha20-arm64.S +++ b/src/crypto/zinc/chacha20/chacha20-arm64.S @@ -289,6 +289,7 @@ ENTRY(chacha20_arm) ret ENDPROC(chacha20_arm) +#ifdef CONFIG_KERNEL_MODE_NEON .align 5 ENTRY(chacha20_neon) cbz x2,.Labort_neon @@ -1940,3 +1941,4 @@ ENTRY(chacha20_neon) .Labort_neon: ret ENDPROC(chacha20_neon) +#endif |