aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/caamhash.c
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2012-07-13 18:49:28 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2012-08-01 05:47:31 -0400
commit61bb86bba169507a5f223b94b9176c32c84b4721 (patch)
tree265d8f59f76c2e6ff8aba29ea4663dff4033ab0a /drivers/crypto/caam/caamhash.c
parent95bcaa39053ff518021572ca00ebf626ee8cbaf8 (diff)
crypto: caam - set descriptor sharing type to SERIAL
SHARE_WAIT, whilst more optimal for association-less crypto, has the ability to start thrashing the CCB descriptor/key caches, given high levels of traffic across multiple security associations (and thus keys). Switch to using the SERIAL sharing type, which prefers the last used CCB for the SA. On a 2-DECO platform such as the P3041, this can improve performance by about 3.7%. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamhash.c')
-rw-r--r--drivers/crypto/caam/caamhash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index dca3c1904eda..fbf3fe8b62f0 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -225,7 +225,7 @@ static inline void init_sh_desc_key_ahash(u32 *desc, struct caam_hash_ctx *ctx)
225{ 225{
226 u32 *key_jump_cmd; 226 u32 *key_jump_cmd;
227 227
228 init_sh_desc(desc, HDR_SHARE_WAIT); 228 init_sh_desc(desc, HDR_SHARE_SERIAL);
229 229
230 if (ctx->split_key_len) { 230 if (ctx->split_key_len) {
231 /* Skip if already shared */ 231 /* Skip if already shared */
@@ -311,7 +311,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash)
311 /* ahash_update shared descriptor */ 311 /* ahash_update shared descriptor */
312 desc = ctx->sh_desc_update; 312 desc = ctx->sh_desc_update;
313 313
314 init_sh_desc(desc, HDR_SHARE_WAIT); 314 init_sh_desc(desc, HDR_SHARE_SERIAL);
315 315
316 /* Import context from software */ 316 /* Import context from software */
317 append_cmd(desc, CMD_SEQ_LOAD | LDST_SRCDST_BYTE_CONTEXT | 317 append_cmd(desc, CMD_SEQ_LOAD | LDST_SRCDST_BYTE_CONTEXT |