12c98833aSArd Biesheuvel# 22c98833aSArd Biesheuvel# linux/arch/arm64/crypto/Makefile 32c98833aSArd Biesheuvel# 42c98833aSArd Biesheuvel# Copyright (C) 2014 Linaro Ltd <ard.biesheuvel@linaro.org> 52c98833aSArd Biesheuvel# 62c98833aSArd Biesheuvel# This program is free software; you can redistribute it and/or modify 72c98833aSArd Biesheuvel# it under the terms of the GNU General Public License version 2 as 82c98833aSArd Biesheuvel# published by the Free Software Foundation. 92c98833aSArd Biesheuvel# 102c98833aSArd Biesheuvel 112c98833aSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA1_ARM64_CE) += sha1-ce.o 122c98833aSArd Biesheuvelsha1-ce-y := sha1-ce-glue.o sha1-ce-core.o 136ba6c74dSArd Biesheuvel 146ba6c74dSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA2_ARM64_CE) += sha2-ce.o 156ba6c74dSArd Biesheuvelsha2-ce-y := sha2-ce-glue.o sha2-ce-core.o 16fdd23894SArd Biesheuvel 17bb6c8c46SArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA512_ARM64_CE) += sha512-ce.o 18bb6c8c46SArd Biesheuvelsha512-ce-y := sha512-ce-glue.o sha512-ce-core.o 19bb6c8c46SArd Biesheuvel 2015d5910eSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA3_ARM64) += sha3-ce.o 2115d5910eSArd Biesheuvelsha3-ce-y := sha3-ce-glue.o sha3-ce-core.o 2215d5910eSArd Biesheuvel 23140aa50dSArd Biesheuvelobj-$(CONFIG_CRYPTO_SM3_ARM64_CE) += sm3-ce.o 24140aa50dSArd Biesheuvelsm3-ce-y := sm3-ce-glue.o sm3-ce-core.o 25140aa50dSArd Biesheuvel 26e99ce921SArd Biesheuvelobj-$(CONFIG_CRYPTO_SM4_ARM64_CE) += sm4-ce.o 27e99ce921SArd Biesheuvelsm4-ce-y := sm4-ce-glue.o sm4-ce-core.o 28e99ce921SArd Biesheuvel 29fdd23894SArd Biesheuvelobj-$(CONFIG_CRYPTO_GHASH_ARM64_CE) += ghash-ce.o 30fdd23894SArd Biesheuvelghash-ce-y := ghash-ce-glue.o ghash-ce-core.o 31317f2f75SArd Biesheuvel 326ef5737fSArd Biesheuvelobj-$(CONFIG_CRYPTO_CRCT10DIF_ARM64_CE) += crct10dif-ce.o 336ef5737fSArd Biesheuvelcrct10dif-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o 346ef5737fSArd Biesheuvel 35317f2f75SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o 36019cd469SArd Biesheuvelaes-ce-cipher-y := aes-ce-core.o aes-ce-glue.o 37a3fd8210SArd Biesheuvel 38a3fd8210SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_CCM) += aes-ce-ccm.o 39a3fd8210SArd Biesheuvelaes-ce-ccm-y := aes-ce-ccm-glue.o aes-ce-ccm-core.o 4049788fe2SArd Biesheuvel 4149788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_BLK) += aes-ce-blk.o 4249788fe2SArd Biesheuvelaes-ce-blk-y := aes-glue-ce.o aes-ce.o 4349788fe2SArd Biesheuvel 4449788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_NEON_BLK) += aes-neon-blk.o 4549788fe2SArd Biesheuvelaes-neon-blk-y := aes-glue-neon.o aes-neon.o 4649788fe2SArd Biesheuvel 477918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA256_ARM64) += sha256-arm64.o 487918ecefSArd Biesheuvelsha256-arm64-y := sha256-glue.o sha256-core.o 497918ecefSArd Biesheuvel 507918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA512_ARM64) += sha512-arm64.o 517918ecefSArd Biesheuvelsha512-arm64-y := sha512-glue.o sha512-core.o 527918ecefSArd Biesheuvel 53b7171ce9SArd Biesheuvelobj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o 54b7171ce9SArd Biesheuvelchacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o 55b7171ce9SArd Biesheuvel 56*a00fa0c8SEric Biggersobj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o 57*a00fa0c8SEric Biggersnhpoly1305-neon-y := nh-neon-core.o nhpoly1305-neon-glue.o 58*a00fa0c8SEric Biggers 59bed593c0SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64) += aes-arm64.o 60bed593c0SArd Biesheuvelaes-arm64-y := aes-cipher-core.o aes-cipher-glue.o 61bed593c0SArd Biesheuvel 621abee99eSArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_BS) += aes-neon-bs.o 631abee99eSArd Biesheuvelaes-neon-bs-y := aes-neonbs-core.o aes-neonbs-glue.o 641abee99eSArd Biesheuvel 6549788fe2SArd BiesheuvelCFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS 6649788fe2SArd Biesheuvel 6749788fe2SArd Biesheuvel$(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE 687c2105fbSAndreas Schwab $(call if_changed_rule,cc_o_c) 697918ecefSArd Biesheuvel 706aaf49b4SLeonard Crestezifdef REGENERATE_ARM64_CRYPTO 717918ecefSArd Biesheuvelquiet_cmd_perlasm = PERLASM $@ 727918ecefSArd Biesheuvel cmd_perlasm = $(PERL) $(<) void $(@) 737918ecefSArd Biesheuvel 747918ecefSArd Biesheuvel$(src)/sha256-core.S_shipped: $(src)/sha512-armv8.pl 757918ecefSArd Biesheuvel $(call cmd,perlasm) 767918ecefSArd Biesheuvel 777918ecefSArd Biesheuvel$(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl 787918ecefSArd Biesheuvel $(call cmd,perlasm) 796aaf49b4SLeonard Crestezendif 807918ecefSArd Biesheuvel 8154a702f7SMasahiro Yamadatargets += sha256-core.S sha512-core.S 82