KVM: nSVM: Check for NRIPS support before updating control field
[firefly-linux-kernel-4.4.55.git] / arch / x86 / crypto / ghash-clmulni-intel_asm.S
index 586f41aac361acb834a3d2370382354bc763754f..185fad49d86f0c114411f4f4bc879bdbd9102874 100644 (file)
 .align 16
 .Lbswap_mask:
        .octa 0x000102030405060708090a0b0c0d0e0f
-.Lpoly:
-       .octa 0xc2000000000000000000000000000001
-.Ltwo_one:
-       .octa 0x00000001000000000000000000000001
 
 #define DATA   %xmm0
 #define SHASH  %xmm1
@@ -134,28 +130,3 @@ ENTRY(clmul_ghash_update)
 .Lupdate_just_ret:
        ret
 ENDPROC(clmul_ghash_update)
-
-/*
- * 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
-ENDPROC(clmul_ghash_setkey)