xref: /openbmc/linux/arch/arm64/crypto/Makefile (revision ac2d838f)
1d2912cb1SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
22c98833aSArd Biesheuvel#
32c98833aSArd Biesheuvel# linux/arch/arm64/crypto/Makefile
42c98833aSArd Biesheuvel#
52c98833aSArd Biesheuvel# Copyright (C) 2014 Linaro Ltd <ard.biesheuvel@linaro.org>
62c98833aSArd Biesheuvel#
72c98833aSArd Biesheuvel
82c98833aSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA1_ARM64_CE) += sha1-ce.o
92c98833aSArd Biesheuvelsha1-ce-y := sha1-ce-glue.o sha1-ce-core.o
106ba6c74dSArd Biesheuvel
116ba6c74dSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA2_ARM64_CE) += sha2-ce.o
126ba6c74dSArd Biesheuvelsha2-ce-y := sha2-ce-glue.o sha2-ce-core.o
13fdd23894SArd Biesheuvel
14bb6c8c46SArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA512_ARM64_CE) += sha512-ce.o
15bb6c8c46SArd Biesheuvelsha512-ce-y := sha512-ce-glue.o sha512-ce-core.o
16bb6c8c46SArd Biesheuvel
1715d5910eSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA3_ARM64) += sha3-ce.o
1815d5910eSArd Biesheuvelsha3-ce-y := sha3-ce-glue.o sha3-ce-core.o
1915d5910eSArd Biesheuvel
20a41b2129STianjia Zhangobj-$(CONFIG_CRYPTO_SM3_NEON) += sm3-neon.o
21a41b2129STianjia Zhangsm3-neon-y := sm3-neon-glue.o sm3-neon-core.o
22a41b2129STianjia Zhang
23140aa50dSArd Biesheuvelobj-$(CONFIG_CRYPTO_SM3_ARM64_CE) += sm3-ce.o
24140aa50dSArd Biesheuvelsm3-ce-y := sm3-ce-glue.o sm3-ce-core.o
25140aa50dSArd Biesheuvel
2602436762STianjia Zhangobj-$(CONFIG_CRYPTO_SM4_ARM64_CE) += sm4-ce-cipher.o
2702436762STianjia Zhangsm4-ce-cipher-y := sm4-ce-cipher-glue.o sm4-ce-cipher-core.o
28e99ce921SArd Biesheuvel
295b33e0ecSTianjia Zhangobj-$(CONFIG_CRYPTO_SM4_ARM64_CE_BLK) += sm4-ce.o
305b33e0ecSTianjia Zhangsm4-ce-y := sm4-ce-glue.o sm4-ce-core.o
315b33e0ecSTianjia Zhang
3267fa3a7fSTianjia Zhangobj-$(CONFIG_CRYPTO_SM4_ARM64_CE_CCM) += sm4-ce-ccm.o
3367fa3a7fSTianjia Zhangsm4-ce-ccm-y := sm4-ce-ccm-glue.o sm4-ce-ccm-core.o
3467fa3a7fSTianjia Zhang
35*ae1b83c7STianjia Zhangobj-$(CONFIG_CRYPTO_SM4_ARM64_CE_GCM) += sm4-ce-gcm.o
36*ae1b83c7STianjia Zhangsm4-ce-gcm-y := sm4-ce-gcm-glue.o sm4-ce-gcm-core.o
37*ae1b83c7STianjia Zhang
384f1aef9bSTianjia Zhangobj-$(CONFIG_CRYPTO_SM4_ARM64_NEON_BLK) += sm4-neon.o
394f1aef9bSTianjia Zhangsm4-neon-y := sm4-neon-glue.o sm4-neon-core.o
404f1aef9bSTianjia Zhang
41fdd23894SArd Biesheuvelobj-$(CONFIG_CRYPTO_GHASH_ARM64_CE) += ghash-ce.o
42fdd23894SArd Biesheuvelghash-ce-y := ghash-ce-glue.o ghash-ce-core.o
43317f2f75SArd Biesheuvel
449d2c0b48SNathan Huckleberryobj-$(CONFIG_CRYPTO_POLYVAL_ARM64_CE) += polyval-ce.o
459d2c0b48SNathan Huckleberrypolyval-ce-y := polyval-ce-glue.o polyval-ce-core.o
469d2c0b48SNathan Huckleberry
476ef5737fSArd Biesheuvelobj-$(CONFIG_CRYPTO_CRCT10DIF_ARM64_CE) += crct10dif-ce.o
486ef5737fSArd Biesheuvelcrct10dif-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o
496ef5737fSArd Biesheuvel
50317f2f75SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o
51019cd469SArd Biesheuvelaes-ce-cipher-y := aes-ce-core.o aes-ce-glue.o
52a3fd8210SArd Biesheuvel
53a3fd8210SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_CCM) += aes-ce-ccm.o
54a3fd8210SArd Biesheuvelaes-ce-ccm-y := aes-ce-ccm-glue.o aes-ce-ccm-core.o
5549788fe2SArd Biesheuvel
5649788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_BLK) += aes-ce-blk.o
5749788fe2SArd Biesheuvelaes-ce-blk-y := aes-glue-ce.o aes-ce.o
5849788fe2SArd Biesheuvel
5949788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_NEON_BLK) += aes-neon-blk.o
6049788fe2SArd Biesheuvelaes-neon-blk-y := aes-glue-neon.o aes-neon.o
6149788fe2SArd Biesheuvel
627918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA256_ARM64) += sha256-arm64.o
637918ecefSArd Biesheuvelsha256-arm64-y := sha256-glue.o sha256-core.o
647918ecefSArd Biesheuvel
657918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA512_ARM64) += sha512-arm64.o
667918ecefSArd Biesheuvelsha512-arm64-y := sha512-glue.o sha512-core.o
677918ecefSArd Biesheuvel
6895a34b77SEric Biggersobj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o
6995a34b77SEric Biggerschacha-neon-y := chacha-neon-core.o chacha-neon-glue.o
70b7171ce9SArd Biesheuvel
71f569ca16SArd Biesheuvelobj-$(CONFIG_CRYPTO_POLY1305_NEON) += poly1305-neon.o
72f569ca16SArd Biesheuvelpoly1305-neon-y := poly1305-core.o poly1305-glue.o
73f569ca16SArd BiesheuvelAFLAGS_poly1305-core.o += -Dpoly1305_init=poly1305_init_arm64
74f569ca16SArd Biesheuvel
75a00fa0c8SEric Biggersobj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o
76a00fa0c8SEric Biggersnhpoly1305-neon-y := nh-neon-core.o nhpoly1305-neon-glue.o
77a00fa0c8SEric Biggers
78bed593c0SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64) += aes-arm64.o
79bed593c0SArd Biesheuvelaes-arm64-y := aes-cipher-core.o aes-cipher-glue.o
80bed593c0SArd Biesheuvel
811abee99eSArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_BS) += aes-neon-bs.o
821abee99eSArd Biesheuvelaes-neon-bs-y := aes-neonbs-core.o aes-neonbs-glue.o
831abee99eSArd Biesheuvel
847918ecefSArd Biesheuvelquiet_cmd_perlasm = PERLASM $@
857918ecefSArd Biesheuvel      cmd_perlasm = $(PERL) $(<) void $(@)
867918ecefSArd Biesheuvel
872063257dSMasahiro Yamada$(obj)/%-core.S: $(src)/%-armv8.pl
88f569ca16SArd Biesheuvel	$(call cmd,perlasm)
89f569ca16SArd Biesheuvel
9012dd461eSMasahiro Yamada$(obj)/sha256-core.S: $(src)/sha512-armv8.pl
917918ecefSArd Biesheuvel	$(call cmd,perlasm)
927918ecefSArd Biesheuvel
93f569ca16SArd Biesheuvelclean-files += poly1305-core.S sha256-core.S sha512-core.S
94