]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/crypto/crc32c-pcl-intel-asm_64.S
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[karo-tx-linux.git] / arch / x86 / crypto / crc32c-pcl-intel-asm_64.S
index cf1a7ec4cc3ae782fe0d1efa03a3db4649e60c2a..dbc4339b5417b793094b22cd94a3659ec38fc671 100644 (file)
@@ -1,9 +1,10 @@
 /*
  * Implement fast CRC32C with PCLMULQDQ instructions. (x86_64)
  *
- * The white paper on CRC32C calculations with PCLMULQDQ instruction can be
+ * The white papers on CRC32C calculations with PCLMULQDQ instruction can be
  * downloaded from:
- * http://download.intel.com/design/intarch/papers/323405.pdf
+ * http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/crc-iscsi-polynomial-crc32-instruction-paper.pdf
+ * http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-paper.pdf
  *
  * Copyright (C) 2012 Intel Corporation.
  *
@@ -42,6 +43,7 @@
  * SOFTWARE.
  */
 
+#include <asm/inst.h>
 #include <linux/linkage.h>
 
 ## ISCSI CRC 32 Implementation with crc32 and pclmulqdq Instruction
@@ -225,10 +227,10 @@ LABEL crc_ %i
        movdqa  (bufp), %xmm0                   # 2 consts: K1:K2
 
        movq    crc_init, %xmm1                 # CRC for block 1
-       pclmulqdq $0x00,%xmm0,%xmm1             # Multiply by K2
+       PCLMULQDQ 0x00,%xmm0,%xmm1              # Multiply by K2
 
        movq    crc1, %xmm2                     # CRC for block 2
-       pclmulqdq $0x10, %xmm0, %xmm2           # Multiply by K1
+       PCLMULQDQ 0x10, %xmm0, %xmm2            # Multiply by K1
 
        pxor    %xmm2,%xmm1
        movq    %xmm1, %rax