From e90b1a2be6010acf01673b0625cfbf18240f7744 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 2 Jun 2006 08:42:25 +1000 Subject: [CRYPTO] aes: Add wrappers for assembly routines The wrapper routines are required when asmlinkage differs from the usual calling convention. So we need to have them. However, by rearranging the parameters, they will get optimised away to a single jump for most people. Signed-off-by: Herbert Xu --- arch/x86_64/crypto/aes.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'arch/x86_64/crypto/aes.c') diff --git a/arch/x86_64/crypto/aes.c b/arch/x86_64/crypto/aes.c index d6f8e0463b5d..68866fab37aa 100644 --- a/arch/x86_64/crypto/aes.c +++ b/arch/x86_64/crypto/aes.c @@ -283,8 +283,18 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, return 0; } -extern void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in); -extern void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in); +asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in); +asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in); + +static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + aes_enc_blk(tfm, dst, src); +} + +static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + aes_dec_blk(tfm, dst, src); +} static struct crypto_alg aes_alg = { .cra_name = "aes", -- cgit v1.2.2