crypto: caam/qi - optimize frame queue cleanup
authorValentin Ciocoi Radulescu <valentin.ciocoi@nxp.com>
Fri, 31 Jan 2020 14:15:56 +0000 (14:15 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Feb 2020 09:05:25 +0000 (17:05 +0800)
commit11144416a7557372e64f68c729f3d7cb8890a6d1
treec7274025a88755a8807e338e6e09082353c4c065
parent21f802cc9896743c61bacac6cb1de109a2cfc8bc
crypto: caam/qi - optimize frame queue cleanup

Add reference counter incremented for each frame enqueued in CAAM
and replace unconditional sleep in empty_caam_fq() with polling the
reference counter.

When CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y boot time on LS1043A
platform with this optimization decreases from ~1100s to ~11s.

Signed-off-by: Valentin Ciocoi Radulescu <valentin.ciocoi@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/qi.c
drivers/crypto/caam/qi.h