aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/crypto
diff options
context:
space:
mode:
authorSandy Wu <sandyw@twitter.com>2013-03-28 20:05:44 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-04-25 09:01:44 -0400
commit57ae1b0532977b30184aaba04b6cafe0a284c21f (patch)
tree5299cd9942ee35d3307b83ebc267d83d3e0067f8 /arch/x86/crypto
parent8c4196a2fd7c31acd6d02d9921f7896b8f160c92 (diff)
crypto: crc32-pclmul - Use gas macro for pclmulqdq
Occurs when CONFIG_CRYPTO_CRC32C_INTEL=y and CONFIG_CRYPTO_CRC32C_INTEL=y. Older versions of bintuils do not support the pclmulqdq instruction. The PCLMULQDQ gas macro is used instead. Signed-off-by: Sandy Wu <sandyw@twitter.com> Cc: stable@vger.kernel.org # 3.8+ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto')
-rw-r--r--arch/x86/crypto/crc32c-pcl-intel-asm_64.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
index 19ec73f6e0b3..dbc4339b5417 100644
--- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
+++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
@@ -43,6 +43,7 @@
43 * SOFTWARE. 43 * SOFTWARE.
44 */ 44 */
45 45
46#include <asm/inst.h>
46#include <linux/linkage.h> 47#include <linux/linkage.h>
47 48
48## ISCSI CRC 32 Implementation with crc32 and pclmulqdq Instruction 49## ISCSI CRC 32 Implementation with crc32 and pclmulqdq Instruction
@@ -226,10 +227,10 @@ LABEL crc_ %i
226 movdqa (bufp), %xmm0 # 2 consts: K1:K2 227 movdqa (bufp), %xmm0 # 2 consts: K1:K2
227 228
228 movq crc_init, %xmm1 # CRC for block 1 229 movq crc_init, %xmm1 # CRC for block 1
229 pclmulqdq $0x00,%xmm0,%xmm1 # Multiply by K2 230 PCLMULQDQ 0x00,%xmm0,%xmm1 # Multiply by K2
230 231
231 movq crc1, %xmm2 # CRC for block 2 232 movq crc1, %xmm2 # CRC for block 2
232 pclmulqdq $0x10, %xmm0, %xmm2 # Multiply by K1 233 PCLMULQDQ 0x10, %xmm0, %xmm2 # Multiply by K1
233 234
234 pxor %xmm2,%xmm1 235 pxor %xmm2,%xmm1
235 movq %xmm1, %rax 236 movq %xmm1, %rax