aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/Kconfig
diff options
context:
space:
mode:
authorchandramouli narayanan <mouli@linux.intel.com>2014-03-20 18:14:00 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-03-21 09:54:30 -0400
commit7c1da8d0d046174a4188b5729d7579abf3d29427 (patch)
treef527edeaff6a2b0404ce1e3ecf079faeff34fc16 /crypto/Kconfig
parent130fa5bc81b44b6cc1fbdea3abf6db0da22964e0 (diff)
crypto: sha - SHA1 transform x86_64 AVX2
This git patch adds x86_64 AVX2 optimization of SHA1 transform to crypto support. The patch has been tested with 3.14.0-rc1 kernel. On a Haswell desktop, with turbo disabled and all cpus running at maximum frequency, tcrypt shows AVX2 performance improvement from 3% for 256 bytes update to 16% for 1024 bytes update over AVX implementation. This patch adds sha1_avx2_transform(), the glue, build and configuration changes needed for AVX2 optimization of SHA1 transform to crypto support. sha1-ssse3 is one module which adds the necessary optimization support (SSSE3/AVX/AVX2) for the low-level SHA1 transform function. With better optimization support, transform function is overridden as the case may be. In the case of AVX2, due to performance reasons across datablock sizes, the AVX or AVX2 transform function is used at run-time as it suits best. The Makefile change therefore appends the necessary objects to the linkage. Due to this, the patch merely appends AVX2 transform to the existing build mix and Kconfig support and leaves the configuration build support as is. Signed-off-by: Chandramouli Narayanan <mouli@linux.intel.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/Kconfig')
-rw-r--r--crypto/Kconfig4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 7bcb70d216e1..ce4012a58781 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -491,14 +491,14 @@ config CRYPTO_SHA1
491 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2). 491 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).
492 492
493config CRYPTO_SHA1_SSSE3 493config CRYPTO_SHA1_SSSE3
494 tristate "SHA1 digest algorithm (SSSE3/AVX)" 494 tristate "SHA1 digest algorithm (SSSE3/AVX/AVX2)"
495 depends on X86 && 64BIT 495 depends on X86 && 64BIT
496 select CRYPTO_SHA1 496 select CRYPTO_SHA1
497 select CRYPTO_HASH 497 select CRYPTO_HASH
498 help 498 help
499 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented 499 SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2) implemented
500 using Supplemental SSE3 (SSSE3) instructions or Advanced Vector 500 using Supplemental SSE3 (SSSE3) instructions or Advanced Vector
501 Extensions (AVX), when available. 501 Extensions (AVX/AVX2), when available.
502 502
503config CRYPTO_SHA256_SSSE3 503config CRYPTO_SHA256_SSSE3
504 tristate "SHA256 digest algorithm (SSSE3/AVX/AVX2)" 504 tristate "SHA256 digest algorithm (SSSE3/AVX/AVX2)"