diff options
Diffstat (limited to 'src/crypto/zinc/poly1305')
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-arm-glue.h | 3 | ||||
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-mips-glue.h | 4 | ||||
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-x86_64-glue.h | 3 | ||||
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305.c | 8 |
4 files changed, 7 insertions, 11 deletions
diff --git a/src/crypto/zinc/poly1305/poly1305-arm-glue.h b/src/crypto/zinc/poly1305/poly1305-arm-glue.h index 6ec2fc8..50fb519 100644 --- a/src/crypto/zinc/poly1305/poly1305-arm-glue.h +++ b/src/crypto/zinc/poly1305/poly1305-arm-glue.h @@ -3,7 +3,6 @@ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ -#include <zinc/poly1305.h> #include <asm/hwcap.h> #include <asm/neon.h> @@ -64,5 +63,3 @@ static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], poly1305_emit_arm(ctx, mac, nonce); return true; } - -#define HAVE_POLY1305_ARCH_IMPLEMENTATION diff --git a/src/crypto/zinc/poly1305/poly1305-mips-glue.h b/src/crypto/zinc/poly1305/poly1305-mips-glue.h index 0e72c8b..6af3f57 100644 --- a/src/crypto/zinc/poly1305/poly1305-mips-glue.h +++ b/src/crypto/zinc/poly1305/poly1305-mips-glue.h @@ -3,8 +3,6 @@ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ -#include <zinc/poly1305.h> - asmlinkage void poly1305_init_mips(void *ctx, const u8 key[16]); asmlinkage void poly1305_blocks_mips(void *ctx, const u8 *inp, const size_t len, const u32 padbit); @@ -35,5 +33,3 @@ static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], poly1305_emit_mips(ctx, mac, nonce); return true; } - -#define HAVE_POLY1305_ARCH_IMPLEMENTATION diff --git a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h index a884d22..63e2a5c 100644 --- a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h +++ b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h @@ -3,7 +3,6 @@ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ -#include <zinc/poly1305.h> #include <asm/cpufeature.h> #include <asm/processor.h> #include <asm/intel-family.h> @@ -117,5 +116,3 @@ static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], poly1305_emit_x86_64(ctx, mac, nonce); return true; } - -#define HAVE_POLY1305_ARCH_IMPLEMENTATION diff --git a/src/crypto/zinc/poly1305/poly1305.c b/src/crypto/zinc/poly1305/poly1305.c index a098b61..aad6587 100644 --- a/src/crypto/zinc/poly1305/poly1305.c +++ b/src/crypto/zinc/poly1305/poly1305.c @@ -13,7 +13,13 @@ #include <linux/kernel.h> #include <linux/string.h> -#ifndef HAVE_POLY1305_ARCH_IMPLEMENTATION +#if defined(CONFIG_ZINC_ARCH_X86_64) +#include "poly1305-x86_64-glue.h" +#elif defined(CONFIG_ZINC_ARCH_ARM) || defined(CONFIG_ZINC_ARCH_ARM64) +#include "poly1305-arm-glue.h" +#elif defined(CONFIG_ZINC_ARCH_MIPS) || defined(CONFIG_ZINC_ARCH_MIPS64) +#include "poly1305-mips-glue.h" +#else static inline bool poly1305_init_arch(void *ctx, const u8 key[POLY1305_KEY_SIZE]) { |