Merge tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux/fpc-iii.git] / arch / x86 / include / asm / crypto / serpent-sse2.h
blobe6e77dffbdabf10e830c6c7be5a70cdc016c862a
1 #ifndef ASM_X86_SERPENT_SSE2_H
2 #define ASM_X86_SERPENT_SSE2_H
4 #include <linux/crypto.h>
5 #include <crypto/serpent.h>
7 #ifdef CONFIG_X86_32
9 #define SERPENT_PARALLEL_BLOCKS 4
11 asmlinkage void __serpent_enc_blk_4way(struct serpent_ctx *ctx, u8 *dst,
12 const u8 *src, bool xor);
13 asmlinkage void serpent_dec_blk_4way(struct serpent_ctx *ctx, u8 *dst,
14 const u8 *src);
16 static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
17 const u8 *src)
19 __serpent_enc_blk_4way(ctx, dst, src, false);
22 static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
23 const u8 *src)
25 __serpent_enc_blk_4way(ctx, dst, src, true);
28 static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
29 const u8 *src)
31 serpent_dec_blk_4way(ctx, dst, src);
34 #else
36 #define SERPENT_PARALLEL_BLOCKS 8
38 asmlinkage void __serpent_enc_blk_8way(struct serpent_ctx *ctx, u8 *dst,
39 const u8 *src, bool xor);
40 asmlinkage void serpent_dec_blk_8way(struct serpent_ctx *ctx, u8 *dst,
41 const u8 *src);
43 static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
44 const u8 *src)
46 __serpent_enc_blk_8way(ctx, dst, src, false);
49 static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
50 const u8 *src)
52 __serpent_enc_blk_8way(ctx, dst, src, true);
55 static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
56 const u8 *src)
58 serpent_dec_blk_8way(ctx, dst, src);
61 #endif
63 #endif