diff options
| author | tls <tls@NetBSD.org> | 2012-02-02 19:42:57 +0000 |
|---|---|---|
| committer | tls <tls@NetBSD.org> | 2012-02-02 19:42:57 +0000 |
| commit | cc9ee3de3e25ef31d3a97dc35bedc36945e35d2a (patch) | |
| tree | 06a2889eb6b4b02bc8b8bba6b5cc3f9b1938d18b /sys/arch/next68k/dev | |
| parent | f622122a62827e27b444c2f95632d61f73357ced (diff) | |
Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.
2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.
3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.
4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.
5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.
ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
Diffstat (limited to 'sys/arch/next68k/dev')
| -rw-r--r-- | sys/arch/next68k/dev/mb8795.c | 9 | ||||
| -rw-r--r-- | sys/arch/next68k/dev/mb8795var.h | 7 |
2 files changed, 3 insertions, 13 deletions
diff --git a/sys/arch/next68k/dev/mb8795.c b/sys/arch/next68k/dev/mb8795.c index 4b04ad179d9..0f4eaaa66e9 100644 --- a/sys/arch/next68k/dev/mb8795.c +++ b/sys/arch/next68k/dev/mb8795.c @@ -1,4 +1,4 @@ -/* $NetBSD: mb8795.c,v 1.49 2010/04/24 19:58:13 dbj Exp $ */ +/* $NetBSD: mb8795.c,v 1.50 2012/02/02 19:43:00 tls Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell * All rights reserved. @@ -25,10 +25,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.49 2010/04/24 19:58:13 dbj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.50 2012/02/02 19:43:00 tls Exp $"); #include "opt_inet.h" -#include "rnd.h" #include <sys/param.h> #include <sys/systm.h> @@ -39,9 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.49 2010/04/24 19:58:13 dbj Exp $"); #include <sys/malloc.h> #include <sys/ioctl.h> #include <sys/errno.h> -#if NRND > 0 #include <sys/rnd.h> -#endif #include <net/if.h> #include <net/if_dl.h> @@ -140,10 +137,8 @@ mb8795_config(struct mb8795_softc *sc, int *media, int nmedia, int defmedia) if (sc->sc_sh == NULL) panic("mb8795_config: can't establish shutdownhook"); -#if NRND > 0 rnd_attach_source(&sc->rnd_source, sc->sc_dev.dv_xname, RND_TYPE_NET, 0); -#endif DPRINTF(("%s: leaving mb8795_config()\n",sc->sc_dev.dv_xname)); } diff --git a/sys/arch/next68k/dev/mb8795var.h b/sys/arch/next68k/dev/mb8795var.h index c53f79b4fb8..1379d5067c9 100644 --- a/sys/arch/next68k/dev/mb8795var.h +++ b/sys/arch/next68k/dev/mb8795var.h @@ -1,4 +1,4 @@ -/* $NetBSD: mb8795var.h,v 1.12 2011/11/19 22:51:20 tls Exp $ */ +/* $NetBSD: mb8795var.h,v 1.13 2012/02/02 19:43:00 tls Exp $ */ /* * Copyright (c) 1998 Darrin B. Jewell * All rights reserved. @@ -24,10 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "rnd.h" /* is random device-driver configured? */ -#if NRND > 0 #include <sys/rnd.h> -#endif /* NRND */ #define MB8795_NRXBUFS (32) @@ -71,9 +68,7 @@ struct mb8795_softc { struct ifmedia sc_media; -#if NRND > 0 krndsource_t rnd_source; -#endif /* NRND */ }; |
