diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-17 18:55:12 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-17 23:40:54 +0200 |
commit | 1906c279fbe3420e31a5a48a19b6daac5fbf1904 (patch) | |
tree | 7eed52ac4d5c9abc0fa67392d11f681c50cf46e6 /src/crypto/zinc/poly1305 | |
parent | 61450db1388ad8ef0936c114da8cbd2192fc2dc6 (diff) |
crypto: do not use -include trick
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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]) { |