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/macppc/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/macppc/dev')
| -rw-r--r-- | sys/arch/macppc/dev/if_gm.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/arch/macppc/dev/if_gm.c b/sys/arch/macppc/dev/if_gm.c index a9914ff19ae..cc6e5706e82 100644 --- a/sys/arch/macppc/dev/if_gm.c +++ b/sys/arch/macppc/dev/if_gm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gm.c,v 1.40 2011/11/19 22:51:20 tls Exp $ */ +/* $NetBSD: if_gm.c,v 1.41 2012/02/02 19:42:59 tls Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -27,10 +27,9 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.40 2011/11/19 22:51:20 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.41 2012/02/02 19:42:59 tls Exp $"); #include "opt_inet.h" -#include "rnd.h" #include <sys/param.h> #include <sys/device.h> @@ -41,9 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_gm.c,v 1.40 2011/11/19 22:51:20 tls Exp $"); #include <sys/systm.h> #include <sys/callout.h> -#if NRND > 0 #include <sys/rnd.h> -#endif #include <uvm/uvm_extern.h> @@ -86,9 +83,7 @@ struct gmac_softc { struct callout sc_tick_ch; char sc_laddr[6]; -#if NRND > 0 krndsource_t sc_rnd_source; /* random source */ -#endif }; #define sc_if sc_ethercom.ec_if @@ -252,9 +247,7 @@ gmac_attach(device_t parent, device_t self, void *aux) if_attach(ifp); ether_ifattach(ifp, laddr); -#if NRND > 0 rnd_attach_source(&sc->sc_rnd_source, xname, RND_TYPE_NET, 0); -#endif } u_int @@ -337,9 +330,7 @@ gmac_intr(void *v) if (status & GMAC_INT_TXEMPTY) gmac_tint(sc); -#if NRND > 0 rnd_add_uint32(&sc->sc_rnd_source, status); -#endif return 1; } |
