crypto: ghash-clmulni-intel - use C implementation for setkey()
[pandora-kernel.git] / arch / x86 / crypto / ghash-clmulni-intel_asm.S
index 1eb7f90..eb4d2a2 100644 (file)
 .align 16
 .Lbswap_mask:
        .octa 0x000102030405060708090a0b0c0d0e0f
-.Lpoly:
-       .octa 0xc2000000000000000000000000000001
-.Ltwo_one:
-       .octa 0x00000001000000000000000000000001
 
 #define DATA   %xmm0
 #define SHASH  %xmm1
@@ -131,27 +127,3 @@ ENTRY(clmul_ghash_update)
        movups DATA, (%rdi)
 .Lupdate_just_ret:
        ret
-
-/*
- * void clmul_ghash_setkey(be128 *shash, const u8 *key);
- *
- * Calculate hash_key << 1 mod poly
- */
-ENTRY(clmul_ghash_setkey)
-       movaps .Lbswap_mask, BSWAP
-       movups (%rsi), %xmm0
-       PSHUFB_XMM BSWAP %xmm0
-       movaps %xmm0, %xmm1
-       psllq $1, %xmm0
-       psrlq $63, %xmm1
-       movaps %xmm1, %xmm2
-       pslldq $8, %xmm1
-       psrldq $8, %xmm2
-       por %xmm1, %xmm0
-       # reduction
-       pshufd $0b00100100, %xmm2, %xmm1
-       pcmpeqd .Ltwo_one, %xmm1
-       pand .Lpoly, %xmm1
-       pxor %xmm1, %xmm0
-       movups %xmm0, (%rdi)
-       ret