aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/crypto/crct10dif-ce-glue.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-08-27 17:38:11 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-09-04 11:37:04 +0800
commit6c1b0da13e521fa5cb4a3541b991efb100aced35 (patch)
tree42ece499bee97e5d059cf2237f513964c8c0b1e7 /arch/arm64/crypto/crct10dif-ce-glue.c
parentcrypto: arm64/crc32 - remove PMULL based CRC32 driver (diff)
downloadlinux-dev-6c1b0da13e521fa5cb4a3541b991efb100aced35.tar.xz
linux-dev-6c1b0da13e521fa5cb4a3541b991efb100aced35.zip
crypto: arm64/crct10dif - preparatory refactor for 8x8 PMULL version
Reorganize the CRC-T10DIF asm routine so we can easily instantiate an alternative version based on 8x8 polynomial multiplication in a subsequent patch. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--arch/arm64/crypto/crct10dif-ce-glue.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/crypto/crct10dif-ce-glue.c b/arch/arm64/crypto/crct10dif-ce-glue.c
index 96f0cae4a022..343a1e95b11a 100644
--- a/arch/arm64/crypto/crct10dif-ce-glue.c
+++ b/arch/arm64/crypto/crct10dif-ce-glue.c
@@ -22,7 +22,9 @@
#define CRC_T10DIF_PMULL_CHUNK_SIZE 16U
-asmlinkage u16 crc_t10dif_pmull(u16 init_crc, const u8 buf[], u64 len);
+asmlinkage u16 crc_t10dif_pmull_p64(u16 init_crc, const u8 buf[], u64 len);
+
+static u16 (*crc_t10dif_pmull)(u16 init_crc, const u8 buf[], u64 len);
static int crct10dif_init(struct shash_desc *desc)
{
@@ -85,6 +87,8 @@ static struct shash_alg crc_t10dif_alg = {
static int __init crc_t10dif_mod_init(void)
{
+ crc_t10dif_pmull = crc_t10dif_pmull_p64;
+
return crypto_register_shash(&crc_t10dif_alg);
}