-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto: serpent-sse2/avx - allow both to be built into kernel
Rename serpent-avx assembler functions so that they do not collide with serpent-sse2 assembler functions when linking both versions in to same kernel image. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Johannes Goetzfried <Johannes.Goetzfried@informatik.stud.uni-erlangen.de> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
- Loading branch information
Jussi Kivilinna
authored and
Herbert Xu
committed
Jun 14, 2012
1 parent
d366db6
commit 3387e7d
Showing
5 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef ASM_X86_SERPENT_AVX_H | ||
#define ASM_X86_SERPENT_AVX_H | ||
|
||
#include <linux/crypto.h> | ||
#include <crypto/serpent.h> | ||
|
||
#define SERPENT_PARALLEL_BLOCKS 8 | ||
|
||
asmlinkage void __serpent_enc_blk_8way_avx(struct serpent_ctx *ctx, u8 *dst, | ||
const u8 *src, bool xor); | ||
asmlinkage void serpent_dec_blk_8way_avx(struct serpent_ctx *ctx, u8 *dst, | ||
const u8 *src); | ||
|
||
static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst, | ||
const u8 *src) | ||
{ | ||
__serpent_enc_blk_8way_avx(ctx, dst, src, false); | ||
} | ||
|
||
static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst, | ||
const u8 *src) | ||
{ | ||
__serpent_enc_blk_8way_avx(ctx, dst, src, true); | ||
} | ||
|
||
static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst, | ||
const u8 *src) | ||
{ | ||
serpent_dec_blk_8way_avx(ctx, dst, src); | ||
} | ||
|
||
#endif |
4 changes: 2 additions & 2 deletions
4
arch/x86/include/asm/serpent.h → arch/x86/include/asm/serpent-sse2.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters