aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/crypto/aes.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-06-01 18:42:25 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-06-26 03:34:42 -0400
commite90b1a2be6010acf01673b0625cfbf18240f7744 (patch)
tree7b99c136335b94bde40a6a260a6d823c83433024 /arch/x86_64/crypto/aes.c
parente805792851bcb0bb42f0c8a352be64564c13e374 (diff)
[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 <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86_64/crypto/aes.c')
-rw-r--r--arch/x86_64/crypto/aes.c14
1 files changed, 12 insertions, 2 deletions
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,
283 return 0; 283 return 0;
284} 284}
285 285
286extern void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in); 286asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in);
287extern void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in); 287asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in);
288
289static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
290{
291 aes_enc_blk(tfm, dst, src);
292}
293
294static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
295{
296 aes_dec_blk(tfm, dst, src);
297}
288 298
289static struct crypto_alg aes_alg = { 299static struct crypto_alg aes_alg = {
290 .cra_name = "aes", 300 .cra_name = "aes",