diff options
author | Huang Ying <ying.huang@intel.com> | 2009-01-09 01:25:50 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-02-18 03:48:05 -0500 |
commit | 07bf44f86989f5ed866510374fe761d1903681fb (patch) | |
tree | b7a4bbd3a66dd6fec0243a12f8569a4ad0fce9da /arch/x86/crypto/aes-x86_64-asm_64.S | |
parent | 109568e110ed67d4be1b28609b9fa00fca97f8eb (diff) |
crypto: aes - Export x86 AES encrypt/decrypt functions
Intel AES-NI AES acceleration instructions touch XMM state, to use
that in soft_irq context, general x86 AES implementation is used as
fallback. The first parameter is changed from struct crypto_tfm * to
struct crypto_aes_ctx * to make it easier to deal with 16 bytes
alignment requirement of AES-NI implementation.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/aes-x86_64-asm_64.S')
-rw-r--r-- | arch/x86/crypto/aes-x86_64-asm_64.S | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/crypto/aes-x86_64-asm_64.S b/arch/x86/crypto/aes-x86_64-asm_64.S index 7f28f62737de..5b577d5a059b 100644 --- a/arch/x86/crypto/aes-x86_64-asm_64.S +++ b/arch/x86/crypto/aes-x86_64-asm_64.S | |||
@@ -17,8 +17,6 @@ | |||
17 | 17 | ||
18 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
19 | 19 | ||
20 | #define BASE crypto_tfm_ctx_offset | ||
21 | |||
22 | #define R1 %rax | 20 | #define R1 %rax |
23 | #define R1E %eax | 21 | #define R1E %eax |
24 | #define R1X %ax | 22 | #define R1X %ax |
@@ -56,13 +54,13 @@ | |||
56 | .align 8; \ | 54 | .align 8; \ |
57 | FUNC: movq r1,r2; \ | 55 | FUNC: movq r1,r2; \ |
58 | movq r3,r4; \ | 56 | movq r3,r4; \ |
59 | leaq BASE+KEY+48(r8),r9; \ | 57 | leaq KEY+48(r8),r9; \ |
60 | movq r10,r11; \ | 58 | movq r10,r11; \ |
61 | movl (r7),r5 ## E; \ | 59 | movl (r7),r5 ## E; \ |
62 | movl 4(r7),r1 ## E; \ | 60 | movl 4(r7),r1 ## E; \ |
63 | movl 8(r7),r6 ## E; \ | 61 | movl 8(r7),r6 ## E; \ |
64 | movl 12(r7),r7 ## E; \ | 62 | movl 12(r7),r7 ## E; \ |
65 | movl BASE+480(r8),r10 ## E; \ | 63 | movl 480(r8),r10 ## E; \ |
66 | xorl -48(r9),r5 ## E; \ | 64 | xorl -48(r9),r5 ## E; \ |
67 | xorl -44(r9),r1 ## E; \ | 65 | xorl -44(r9),r1 ## E; \ |
68 | xorl -40(r9),r6 ## E; \ | 66 | xorl -40(r9),r6 ## E; \ |