diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-11 01:01:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-11 01:01:27 -0500 |
commit | 4f58cb90bcb04cfe18f524d1c9a65edef5eb3f51 (patch) | |
tree | 8c686e8b736eed7258921909282c0955543c7d2f /arch/x86/include/asm | |
parent | e7691a1ce341c80ed9504244a36b31c025217391 (diff) | |
parent | 08c70fc3a239475122e20b7a21dfae4c264c24f7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (54 commits)
crypto: gf128mul - remove leftover "(EXPERIMENTAL)" in Kconfig
crypto: serpent-sse2 - remove unneeded LRW/XTS #ifdefs
crypto: serpent-sse2 - select LRW and XTS
crypto: twofish-x86_64-3way - remove unneeded LRW/XTS #ifdefs
crypto: twofish-x86_64-3way - select LRW and XTS
crypto: xts - remove dependency on EXPERIMENTAL
crypto: lrw - remove dependency on EXPERIMENTAL
crypto: picoxcell - fix boolean and / or confusion
crypto: caam - remove DECO access initialization code
crypto: caam - fix polarity of "propagate error" logic
crypto: caam - more desc.h cleanups
crypto: caam - desc.h - convert spaces to tabs
crypto: talitos - convert talitos_error to struct device
crypto: talitos - remove NO_IRQ references
crypto: talitos - fix bad kfree
crypto: convert drivers/crypto/* to use module_platform_driver()
char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver()
crypto: serpent-sse2 - should select CRYPTO_CRYPTD
crypto: serpent - rename serpent.c to serpent_generic.c
crypto: serpent - cleanup checkpatch errors and warnings
...
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/serpent.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/x86/include/asm/serpent.h b/arch/x86/include/asm/serpent.h new file mode 100644 index 00000000000..d3ef63fe0c8 --- /dev/null +++ b/arch/x86/include/asm/serpent.h | |||
@@ -0,0 +1,63 @@ | |||
1 | #ifndef ASM_X86_SERPENT_H | ||
2 | #define ASM_X86_SERPENT_H | ||
3 | |||
4 | #include <linux/crypto.h> | ||
5 | #include <crypto/serpent.h> | ||
6 | |||
7 | #ifdef CONFIG_X86_32 | ||
8 | |||
9 | #define SERPENT_PARALLEL_BLOCKS 4 | ||
10 | |||
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); | ||
15 | |||
16 | static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst, | ||
17 | const u8 *src) | ||
18 | { | ||
19 | __serpent_enc_blk_4way(ctx, dst, src, false); | ||
20 | } | ||
21 | |||
22 | static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst, | ||
23 | const u8 *src) | ||
24 | { | ||
25 | __serpent_enc_blk_4way(ctx, dst, src, true); | ||
26 | } | ||
27 | |||
28 | static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst, | ||
29 | const u8 *src) | ||
30 | { | ||
31 | serpent_dec_blk_4way(ctx, dst, src); | ||
32 | } | ||
33 | |||
34 | #else | ||
35 | |||
36 | #define SERPENT_PARALLEL_BLOCKS 8 | ||
37 | |||
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); | ||
42 | |||
43 | static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst, | ||
44 | const u8 *src) | ||
45 | { | ||
46 | __serpent_enc_blk_8way(ctx, dst, src, false); | ||
47 | } | ||
48 | |||
49 | static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst, | ||
50 | const u8 *src) | ||
51 | { | ||
52 | __serpent_enc_blk_8way(ctx, dst, src, true); | ||
53 | } | ||
54 | |||
55 | static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst, | ||
56 | const u8 *src) | ||
57 | { | ||
58 | serpent_dec_blk_8way(ctx, dst, src); | ||
59 | } | ||
60 | |||
61 | #endif | ||
62 | |||
63 | #endif | ||