Commit 3387e7d6 authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by Herbert Xu

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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Cc: Johannes Goetzfried <Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
Signed-off-by: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d366db60
...@@ -579,10 +579,10 @@ ...@@ -579,10 +579,10 @@
vmovdqu x3, (3*4*4)(out); vmovdqu x3, (3*4*4)(out);
.align 8 .align 8
.global __serpent_enc_blk_8way .global __serpent_enc_blk_8way_avx
.type __serpent_enc_blk_8way,@function; .type __serpent_enc_blk_8way_avx,@function;
__serpent_enc_blk_8way: __serpent_enc_blk_8way_avx:
/* input: /* input:
* %rdi: ctx, CTX * %rdi: ctx, CTX
* %rsi: dst * %rsi: dst
...@@ -647,10 +647,10 @@ __enc_xor8: ...@@ -647,10 +647,10 @@ __enc_xor8:
ret; ret;
.align 8 .align 8
.global serpent_dec_blk_8way .global serpent_dec_blk_8way_avx
.type serpent_dec_blk_8way,@function; .type serpent_dec_blk_8way_avx,@function;
serpent_dec_blk_8way: serpent_dec_blk_8way_avx:
/* input: /* input:
* %rdi: ctx, CTX * %rdi: ctx, CTX
* %rsi: dst * %rsi: dst
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <asm/i387.h> #include <asm/i387.h>
#include <asm/xcr.h> #include <asm/xcr.h>
#include <asm/xsave.h> #include <asm/xsave.h>
#include <asm/serpent.h> #include <asm/serpent-avx.h>
#include <crypto/scatterwalk.h> #include <crypto/scatterwalk.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <crypto/lrw.h> #include <crypto/lrw.h>
#include <crypto/xts.h> #include <crypto/xts.h>
#include <asm/i387.h> #include <asm/i387.h>
#include <asm/serpent.h> #include <asm/serpent-sse2.h>
#include <crypto/scatterwalk.h> #include <crypto/scatterwalk.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
#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
#ifndef ASM_X86_SERPENT_H #ifndef ASM_X86_SERPENT_SSE2_H
#define ASM_X86_SERPENT_H #define ASM_X86_SERPENT_SSE2_H
#include <linux/crypto.h> #include <linux/crypto.h>
#include <crypto/serpent.h> #include <crypto/serpent.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment