diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-23 03:53:35 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-23 17:05:23 +0200 |
commit | 94549a595c7ff6a2040d11009b14576c64ee9b88 (patch) | |
tree | a0f41bed7257c873b9561b37888c45e600dbd334 /src/crypto/zinc/chacha20/chacha20-arm-glue.h | |
parent | dad4e5d2e29f3e19f95982bf3e468f0f965379ce (diff) |
crypto-arm: rework KERNEL_MODE_NEON handling again
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20-arm-glue.h')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20-arm-glue.h | 9 |
1 files changed, 2 insertions, 7 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); |