diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-09-08 14:15:57 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-09-08 14:15:57 +0000 |
commit | 2c0c301deb10662e3dbe20c8870ce9b9ca67853e (patch) | |
tree | 7e67763f699f0be1ffd304ff8f65368363b894fe /sys/kern | |
parent | 1d264ec471038b319a8ce96e1a14dbfa6353698d (diff) |
Reintroduce most crypto/crypto.c r1.55:
Move pool initialization to init_crypto and zap the crypto_pool_initialized
variable. This way we don't have to check if the pool are initialized every
time we do a crypto_getreq().
However, also perform the crypto initialisation earlier in init_main so
that the crypto pools are initialised before they are used.
ok mikeb@ thib@ deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/init_main.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 14afa2af599..34beffbe642 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.170 2010/07/26 01:56:27 guenther Exp $ */ +/* $OpenBSD: init_main.c,v 1.171 2010/09/08 14:15:56 jsing Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -140,7 +140,7 @@ void start_init(void *); void start_cleaner(void *); void start_update(void *); void start_reaper(void *); -void init_crypto(void); +void crypto_init(void); void init_exec(void); void kqueue_init(void); void workq_init(void); @@ -387,6 +387,7 @@ main(void *framep) (*pdev->pdev_attach)(pdev->pdev_count); #ifdef CRYPTO + crypto_init(); swcr_init(); #endif /* CRYPTO */ @@ -524,11 +525,6 @@ main(void *framep) if (kthread_create(uvm_aiodone_daemon, NULL, NULL, "aiodoned")) panic("fork aiodoned"); -#ifdef CRYPTO - /* Create the crypto kernel thread. */ - init_crypto(); -#endif /* CRYPTO */ - microtime(&rtv); srandom((u_int32_t)(rtv.tv_sec ^ rtv.tv_usec) ^ arc4random()); |