crypto: x86 - use local headers for x86 specific shared declarations
authorArd Biesheuvel <ardb@kernel.org>
Tue, 5 Jan 2021 16:48:09 +0000 (17:48 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 14 Jan 2021 06:10:30 +0000 (17:10 +1100)
The Camellia, Serpent and Twofish related header files only contain
declarations that are shared between different implementations of the
respective algorithms residing under arch/x86/crypto, and none of their
contents should be used elsewhere. So move the header files into the
same location, and use local #includes instead.

Acked-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
12 files changed:
arch/x86/crypto/camellia.h [moved from arch/x86/include/asm/crypto/camellia.h with 100% similarity]
arch/x86/crypto/camellia_aesni_avx2_glue.c
arch/x86/crypto/camellia_aesni_avx_glue.c
arch/x86/crypto/camellia_glue.c
arch/x86/crypto/serpent-avx.h [moved from arch/x86/include/asm/crypto/serpent-avx.h with 100% similarity]
arch/x86/crypto/serpent-sse2.h [moved from arch/x86/include/asm/crypto/serpent-sse2.h with 100% similarity]
arch/x86/crypto/serpent_avx2_glue.c
arch/x86/crypto/serpent_avx_glue.c
arch/x86/crypto/serpent_sse2_glue.c
arch/x86/crypto/twofish.h [moved from arch/x86/include/asm/crypto/twofish.h with 100% similarity]
arch/x86/crypto/twofish_avx_glue.c
arch/x86/crypto/twofish_glue_3way.c

index ef5c0f094584910c3c5153edf421e26140b3d682..e7e4d64e9577e9956d49df01b491aac580b1fcbf 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
  */
 
-#include <asm/crypto/camellia.h>
 #include <crypto/algapi.h>
 #include <crypto/internal/simd.h>
 #include <linux/crypto.h>
@@ -13,6 +12,7 @@
 #include <linux/module.h>
 #include <linux/types.h>
 
+#include "camellia.h"
 #include "ecb_cbc_helpers.h"
 
 #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16
index 68fed0a798892f8ddd33e4fe08c0ee6044dee486..c7ccf63e741e16a9ec3386e63a206763bf3dee45 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright © 2012-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
  */
 
-#include <asm/crypto/camellia.h>
 #include <crypto/algapi.h>
 #include <crypto/internal/simd.h>
 #include <linux/crypto.h>
@@ -13,6 +12,7 @@
 #include <linux/module.h>
 #include <linux/types.h>
 
+#include "camellia.h"
 #include "ecb_cbc_helpers.h"
 
 #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16
index 0bc00ce6848459165a85ea6afd7ae0b1d12480e6..66c435ba9d3da0a6ffde0b114bde995631ab1b33 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <crypto/algapi.h>
-#include <asm/crypto/camellia.h>
 
+#include "camellia.h"
 #include "ecb_cbc_helpers.h"
 
 /* regular block cipher functions */
index 261c9ac2d762ae7dfa70a27adcbcd6095a19a241..ccf0b5fa4933066c054c2269a40cbbf6b9d3a08a 100644 (file)
@@ -12,8 +12,8 @@
 #include <crypto/algapi.h>
 #include <crypto/internal/simd.h>
 #include <crypto/serpent.h>
-#include <asm/crypto/serpent-avx.h>
 
+#include "serpent-avx.h"
 #include "ecb_cbc_helpers.h"
 
 #define SERPENT_AVX2_PARALLEL_BLOCKS 16
index 5fe01d2a5b1d3443e0b4b49294fa6f7e3f98dba8..6c248e1ea4ef7dde3a595e5ef0c9d2457be6acdf 100644 (file)
@@ -15,8 +15,8 @@
 #include <crypto/algapi.h>
 #include <crypto/internal/simd.h>
 #include <crypto/serpent.h>
-#include <asm/crypto/serpent-avx.h>
 
+#include "serpent-avx.h"
 #include "ecb_cbc_helpers.h"
 
 /* 8-way parallel cipher functions */
index e28d60949c160f5468c07c481929b58a6b0fa2ae..d78f37e9b2cf71b039048a7efa2d0511d9eba5c9 100644 (file)
@@ -20,8 +20,8 @@
 #include <crypto/b128ops.h>
 #include <crypto/internal/simd.h>
 #include <crypto/serpent.h>
-#include <asm/crypto/serpent-sse2.h>
 
+#include "serpent-sse2.h"
 #include "ecb_cbc_helpers.h"
 
 static int serpent_setkey_skcipher(struct crypto_skcipher *tfm,
index 6ce198f808a5bea4cf1dd306235406ddaf60ff12..3eb3440b477a8e19f7326f3ff17365e421be5164 100644 (file)
@@ -15,8 +15,8 @@
 #include <crypto/algapi.h>
 #include <crypto/internal/simd.h>
 #include <crypto/twofish.h>
-#include <asm/crypto/twofish.h>
 
+#include "twofish.h"
 #include "ecb_cbc_helpers.h"
 
 #define TWOFISH_PARALLEL_BLOCKS 8
index d1fdefa5195ac22af94d8b66e5e2551c073eea60..03725696397c8e32b80f4735900c5a0355a5bb21 100644 (file)
@@ -5,7 +5,6 @@
  * Copyright (c) 2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
  */
 
-#include <asm/crypto/twofish.h>
 #include <crypto/algapi.h>
 #include <crypto/twofish.h>
 #include <linux/crypto.h>
@@ -13,6 +12,7 @@
 #include <linux/module.h>
 #include <linux/types.h>
 
+#include "twofish.h"
 #include "ecb_cbc_helpers.h"
 
 EXPORT_SYMBOL_GPL(__twofish_enc_blk_3way);