diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2018-08-30 11:00:14 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-09-04 11:37:04 +0800 |
commit | dd8b083f9a5ed06946d559e0ca1eda0577ef24a9 (patch) | |
tree | b51a09a36977e0b3c96a290c1bcb053963b6d5f5 /crypto/algapi.c | |
parent | 2fffee536c6875bdf546cee0045fed8faa5ea51f (diff) |
crypto: api - Introduce notifier for new crypto algorithms
Introduce a facility that can be used to receive a notification
callback when a new algorithm becomes available. This can be used by
existing crypto registrations to trigger a switch from a software-only
algorithm to a hardware-accelerated version.
A new CRYPTO_MSG_ALG_LOADED state is introduced to the existing crypto
notification chain, and the register/unregister functions are exported
so they can be called by subsystems outside of crypto.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 496fc51bf215..38daa8677da9 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -372,6 +372,8 @@ static void crypto_wait_for_test(struct crypto_larval *larval) err = wait_for_completion_killable(&larval->completion); WARN_ON(err); + if (!err) + crypto_probing_notify(CRYPTO_MSG_ALG_LOADED, larval); out: crypto_larval_kill(&larval->alg); |