android_kernel_samsung_msm8976/crypto
Jussi Kivilinna 937c30d7f5 crypto: serpent - add 8-way parallel x86_64/SSE2 assembler implementation
Patch adds x86_64/SSE2 assembler implementation of serpent cipher. Assembler
functions crypt data in eigth block chunks (two 4 block chunk SSE2 operations
in parallel to improve performance on out-of-order CPUs). Glue code is based
on one from AES-NI implementation, so requests from irq context are redirected
to cryptd.

v2:
 - add missing include of linux/module.h
   (appearently crypto.h used to include module.h, which changed for 3.2 by
    commit 7c926402a7)

Patch has been tested with tcrypt and automated filesystem tests.

Tcrypt benchmarks results (serpent-sse2/serpent_generic speed ratios):

AMD Phenom II 1055T (fam:16, model:10):

size    ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec
16B     1.03x   1.01x   1.03x   1.05x   1.00x   0.99x
64B     1.00x   1.01x   1.02x   1.04x   1.02x   1.01x
256B    2.34x   2.41x   0.99x   2.43x   2.39x   2.40x
1024B   2.51x   2.57x   1.00x   2.59x   2.56x   2.56x
8192B   2.50x   2.54x   1.00x   2.55x   2.57x   2.57x

Intel Celeron T1600 (fam:6, model:15, step:13):

size    ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec
16B     0.97x   0.97x   1.01x   1.01x   1.01x   1.02x
64B     1.00x   1.00x   1.00x   1.02x   1.01x   1.01x
256B    3.41x   3.35x   1.00x   3.39x   3.42x   3.44x
1024B   3.75x   3.72x   0.99x   3.74x   3.75x   3.75x
8192B   3.70x   3.68x   0.99x   3.68x   3.69x   3.69x

Full output:
 http://koti.mbnet.fi/axh/kernel/crypto/phenom-ii-1055t/serpent-generic.txt
 http://koti.mbnet.fi/axh/kernel/crypto/phenom-ii-1055t/serpent-sse2.txt
 http://koti.mbnet.fi/axh/kernel/crypto/celeron-t1600/serpent-generic.txt
 http://koti.mbnet.fi/axh/kernel/crypto/celeron-t1600/serpent-sse2.txt

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-11-21 16:13:23 +08:00
..
async_tx crypto: add module.h to those files that are explicitly using it 2011-10-31 19:31:11 -04:00
ablkcipher.c crypto: Add userspace report for givcipher type algorithms 2011-10-21 14:24:05 +02:00
aead.c crypto: Add userspace report for nivaead type algorithms 2011-10-21 14:24:06 +02:00
aes_generic.c crypto: aes_generic - Fix checkpatch errors 2010-02-16 20:34:59 +08:00
af_alg.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ahash.c crypto: Add userspace report for ahash type algorithms 2011-10-21 14:24:04 +02:00
algapi.c crypto: Unlink and free instances when deleted 2011-11-09 12:04:06 +08:00
algboss.c crypto: testmgr - Fix test disabling option 2010-08-06 09:40:28 +08:00
algif_hash.c crypto: algif_hash - Handle initial af_alg_make_sg error correctly 2011-06-30 07:44:06 +08:00
algif_skcipher.c crypto: algif_skcipher - Handle unaligned receive buffer 2010-11-30 17:04:31 +08:00
ansi_cprng.c crypto: ansi_cprng - enforce key != seed in fips mode 2011-11-09 12:04:06 +08:00
anubis.c crypto: anubis - Fix checkpatch errors 2010-02-16 20:25:39 +08:00
api.c crypto: api - Fix checkpatch errors 2010-02-16 20:26:46 +08:00
arc4.c crypto: arc4 - Fixed coding style issues 2011-06-30 07:44:05 +08:00
authenc.c crypto: Use scatterwalk_crypto_chain 2010-12-02 14:47:16 +08:00
authencesn.c crypto: authencesn - Add algorithm to handle IPsec extended sequence numbers 2011-03-13 20:22:27 -07:00
blkcipher.c crypto: Add userspace report for blkcipher type algorithms 2011-10-21 14:24:05 +02:00
blowfish_common.c crypto: blowfish - split generic and common c code 2011-09-22 21:25:25 +10:00
blowfish_generic.c crypto: blowfish - rename C-version to blowfish_generic 2011-09-22 21:25:26 +10:00
camellia.c crypto: camellia - Fix checkpatch errors 2010-02-16 20:27:57 +08:00
cast5.c crypto: cast5 - simplify if-statements 2010-11-13 21:47:55 +09:00
cast6.c crypto: cast6 - Fix checkpatch errors 2010-02-16 20:29:45 +08:00
cbc.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
ccm.c crypto: ccm - Fix handling of null assoc data 2009-01-27 17:11:15 +11:00
chainiv.c crypto: chainiv - Use kcrypto_wq instead of keventd_wq 2009-02-19 14:44:02 +08:00
cipher.c crypto: cipher - Fix checkpatch errors 2010-02-16 20:31:37 +08:00
compress.c crypto: compress - Fix checkpatch errors 2010-02-16 20:31:04 +08:00
crc32c.c crypto: crc32c - Fixed coding style issue 2011-06-30 07:44:05 +08:00
cryptd.c crypto: cryptd - Use subsys_initcall to prevent races with aesni 2011-08-20 16:08:03 +08:00
crypto_null.c crypto: crypto_null - Fix checkpatch errors 2010-02-16 20:31:54 +08:00
crypto_user.c crypto: Unlink and free instances when deleted 2011-11-09 12:04:06 +08:00
crypto_wq.c crypto: add module.h to those files that are explicitly using it 2011-10-31 19:31:11 -04:00
ctr.c crypto: Use ERR_CAST 2010-05-26 10:36:51 +10:00
cts.c [CRYPTO] cts: Init SG tables 2008-06-02 15:46:51 +10:00
deflate.c net+crypto: Use vmalloc for zlib inflate buffers. 2011-06-29 05:48:41 -07:00
des_generic.c Blackfin: Rename DES PC2() symbol to avoid collision 2010-10-07 14:08:50 +01:00
ecb.c crypto: ecb - Fix checkpatch errors 2010-02-16 20:33:49 +08:00
eseqiv.c crypto: Use scatterwalk_crypto_chain 2010-12-02 14:47:16 +08:00
fcrypt.c crypto: fcrypt - Fix checkpatch errors 2010-02-16 20:34:07 +08:00
fips.c crypto: api - Add fips_enable flag 2008-08-29 15:50:02 +10:00
gcm.c crypto: Use scatterwalk_crypto_chain 2010-12-02 14:47:16 +08:00
gf128mul.c crypto: gf128mul - fix call to memset() 2011-07-08 17:21:21 +08:00
ghash-generic.c crypto: ghash - Avoid null pointer dereference if no key is set 2011-10-21 13:18:42 +02:00
hmac.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
internal.h crypto: Export crypto_remove_final 2011-10-21 14:24:03 +02:00
Kconfig crypto: serpent - add 8-way parallel x86_64/SSE2 assembler implementation 2011-11-21 16:13:23 +08:00
khazad.c [CRYPTO] all: Clean up init()/fini() 2008-04-21 10:19:34 +08:00
krng.c crypto: rng - RNG interface and implementation 2008-08-29 15:50:04 +10:00
lrw.c crypto: lrw - add interface for parallelized cipher implementions 2011-11-09 11:50:31 +08:00
lzo.c [CRYPTO] all: Clean up init()/fini() 2008-04-21 10:19:34 +08:00
Makefile crypto: serpent - rename module from serpent to serpent_generic 2011-11-09 11:43:00 +08:00
md4.c crypto: add module.h to those files that are explicitly using it 2011-10-31 19:31:11 -04:00
md5.c crypto: Move md5_transform to lib/md5.c 2011-08-06 18:32:45 -07:00
michael_mic.c crypto: michael_mic - Switch to shash 2008-12-25 11:02:24 +11:00
pcbc.c Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) 2008-02-07 08:42:26 -08:00
pcompress.c crypto: Add userspace report for pcompress type algorithms 2011-10-21 14:24:06 +02:00
pcrypt.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2011-01-13 10:25:58 -08:00
proc.c crypto: add module.h to those files that are explicitly using it 2011-10-31 19:31:11 -04:00
ripemd.h [CRYPTO] ripemd: Put all common RIPEMD values in header file 2008-07-10 20:35:12 +08:00
rmd128.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rmd160.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rmd256.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rmd320.c crypto: ripemd - Set module author and update email address 2011-01-04 23:34:03 +11:00
rng.c crypto: Add userspace report for rng type algorithms 2011-10-21 14:24:06 +02:00
salsa20_generic.c crypto: salsa20 - Remove private wrappers around various operations 2008-12-25 11:02:30 +11:00
scatterwalk.c crypto: scatterwalk - Fix scatterwalk_done() test 2010-05-19 14:06:29 +10:00
seed.c
seqiv.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
serpent.c crypto: serpent - rename module from serpent to serpent_generic 2011-11-09 11:43:00 +08:00
sha1_generic.c crypto: sha1 - export sha1_update for reuse 2011-08-10 19:00:28 +08:00
sha256_generic.c crypto: sha256_generic - Add export/import support 2009-07-11 18:23:34 +08:00
sha512_generic.c crypto: sha512_generic - Use 64-bit counters 2009-07-22 14:38:13 +08:00
shash.c crypto: Add userspace report for shash type algorithms 2011-10-21 14:24:04 +02:00
tcrypt.c crypto: tcrypt - add xts(twofish) tests 2011-11-09 11:57:56 +08:00
tcrypt.h crypto: tcrypt - add xts(serpent) tests 2011-11-09 11:57:56 +08:00
tea.c [CRYPTO] all: Clean up init()/fini() 2008-04-21 10:19:34 +08:00
testmgr.c crypto: serpent - add 8-way parallel x86_64/SSE2 assembler implementation 2011-11-21 16:13:23 +08:00
testmgr.h crypto: testmgr - add xts(twofish) test vectors 2011-11-09 11:57:56 +08:00
tgr192.c crypto: tgr192 - Switch to shash 2008-12-25 11:02:21 +11:00
twofish_common.c crypto: twofish-x86_64-3way - add lrw support 2011-11-09 11:53:32 +08:00
twofish_generic.c crypto: twofish: Rename twofish to twofish_generic and add an alias 2010-06-03 21:02:51 +10:00
vmac.c crypto: add module.h to those files that are explicitly using it 2011-10-31 19:31:11 -04:00
wp512.c crypto: whirlpool - count rounds from 0 2011-10-21 14:24:16 +02:00
xcbc.c crypto: add module.h to those files that are explicitly using it 2011-10-31 19:31:11 -04:00
xor.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xts.c crypto: xts: add interface for parallelized cipher implementations 2011-11-09 11:56:06 +08:00
zlib.c net+crypto: Use vmalloc for zlib inflate buffers. 2011-06-29 05:48:41 -07:00