diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-08-28 09:49:28 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-06 16:17:06 -0400 |
commit | 312639bb1bc65abca243a6cee6e5364663d2dd7a (patch) | |
tree | f185d1f62078bb7671d60275d1ebcc56b388c78b /crypto | |
parent | 35434c5fb7919bbc1112d9da2c19b5ea79fb7850 (diff) |
Revert "[CRYPTO] cast6: inline bloat--"
This reverts commit e6ccc727f30a02670f6a00df6d548942bc988f43.
Above commit caused performance regression for CAST6. Reverting gives
following increase in tcrypt speed tests (revert-vs-old ratios).
AMD Phenom II X6 1055T, x86-64:
size ecb cbc ctr lrw xts
enc dec enc dec enc dec enc dec enc dec
16b 1.15x 1.17x 1.16x 1.17x 1.16x 1.16x 1.14x 1.19x 1.05x 1.07x
64b 1.19x 1.23x 1.20x 1.22x 1.19x 1.19x 1.16x 1.24x 1.12x 1.12x
256b 1.21x 1.24x 1.22x 1.24x 1.20x 1.20x 1.17x 1.21x 1.16x 1.14x
1kb 1.21x 1.25x 1.22x 1.24x 1.21x 1.21x 1.18x 1.22x 1.17x 1.15x
8kb 1.21x 1.25x 1.22x 1.24x 1.21x 1.21x 1.18x 1.22x 1.18x 1.15x
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cast6_generic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/cast6_generic.c b/crypto/cast6_generic.c index dc9309d70405..1acd2f1c48fc 100644 --- a/crypto/cast6_generic.c +++ b/crypto/cast6_generic.c | |||
@@ -370,7 +370,7 @@ static const u8 Tr[4][8] = { | |||
370 | }; | 370 | }; |
371 | 371 | ||
372 | /* forward octave */ | 372 | /* forward octave */ |
373 | static void W(u32 *key, unsigned int i) | 373 | static inline void W(u32 *key, unsigned int i) |
374 | { | 374 | { |
375 | u32 I; | 375 | u32 I; |
376 | key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]); | 376 | key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]); |
@@ -434,7 +434,7 @@ int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) | |||
434 | EXPORT_SYMBOL_GPL(cast6_setkey); | 434 | EXPORT_SYMBOL_GPL(cast6_setkey); |
435 | 435 | ||
436 | /*forward quad round*/ | 436 | /*forward quad round*/ |
437 | static void Q(u32 *block, u8 *Kr, u32 *Km) | 437 | static inline void Q(u32 *block, u8 *Kr, u32 *Km) |
438 | { | 438 | { |
439 | u32 I; | 439 | u32 I; |
440 | block[2] ^= F1(block[3], Kr[0], Km[0]); | 440 | block[2] ^= F1(block[3], Kr[0], Km[0]); |
@@ -444,7 +444,7 @@ static void Q(u32 *block, u8 *Kr, u32 *Km) | |||
444 | } | 444 | } |
445 | 445 | ||
446 | /*reverse quad round*/ | 446 | /*reverse quad round*/ |
447 | static void QBAR(u32 *block, u8 *Kr, u32 *Km) | 447 | static inline void QBAR(u32 *block, u8 *Kr, u32 *Km) |
448 | { | 448 | { |
449 | u32 I; | 449 | u32 I; |
450 | block[3] ^= F1(block[0], Kr[3], Km[3]); | 450 | block[3] ^= F1(block[0], Kr[3], Km[3]); |