diff options
author | Alexander Shishkin <virtuoso@slind.org> | 2010-06-03 06:53:43 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-06-03 06:53:43 -0400 |
commit | 0b767f96164b2b27488e3daa722ff16e89d49314 (patch) | |
tree | ce87ec84059ca185aee738235bb8fca942782dd8 /crypto/algboss.c | |
parent | bc94e59662c13516d13e117b6edab4bec487d5a0 (diff) |
crypto: testmgr - add an option to disable cryptoalgos' self-tests
By default, CONFIG_CRYPTO_MANAGER_TESTS will be enabled and thus
self-tests will still run, but it is now possible to disable them
to gain some time during bootup.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r-- | crypto/algboss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c index c3c196b5823a..40bd391f34d9 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c | |||
@@ -206,6 +206,7 @@ err: | |||
206 | return NOTIFY_OK; | 206 | return NOTIFY_OK; |
207 | } | 207 | } |
208 | 208 | ||
209 | #ifdef CONFIG_CRYPTO_MANAGER_TESTS | ||
209 | static int cryptomgr_test(void *data) | 210 | static int cryptomgr_test(void *data) |
210 | { | 211 | { |
211 | struct crypto_test_param *param = data; | 212 | struct crypto_test_param *param = data; |
@@ -266,6 +267,7 @@ err_put_module: | |||
266 | err: | 267 | err: |
267 | return NOTIFY_OK; | 268 | return NOTIFY_OK; |
268 | } | 269 | } |
270 | #endif /* CONFIG_CRYPTO_MANAGER_TESTS */ | ||
269 | 271 | ||
270 | static int cryptomgr_notify(struct notifier_block *this, unsigned long msg, | 272 | static int cryptomgr_notify(struct notifier_block *this, unsigned long msg, |
271 | void *data) | 273 | void *data) |
@@ -273,8 +275,10 @@ static int cryptomgr_notify(struct notifier_block *this, unsigned long msg, | |||
273 | switch (msg) { | 275 | switch (msg) { |
274 | case CRYPTO_MSG_ALG_REQUEST: | 276 | case CRYPTO_MSG_ALG_REQUEST: |
275 | return cryptomgr_schedule_probe(data); | 277 | return cryptomgr_schedule_probe(data); |
278 | #ifdef CONFIG_CRYPTO_MANAGER_TESTS | ||
276 | case CRYPTO_MSG_ALG_REGISTER: | 279 | case CRYPTO_MSG_ALG_REGISTER: |
277 | return cryptomgr_schedule_test(data); | 280 | return cryptomgr_schedule_test(data); |
281 | #endif | ||
278 | } | 282 | } |
279 | 283 | ||
280 | return NOTIFY_DONE; | 284 | return NOTIFY_DONE; |