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/sun2/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/sun2/dev')
| -rw-r--r-- | sys/arch/sun2/dev/if_ec.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/arch/sun2/dev/if_ec.c b/sys/arch/sun2/dev/if_ec.c index 0237ba2e716..b6aae6dedd9 100644 --- a/sys/arch/sun2/dev/if_ec.c +++ b/sys/arch/sun2/dev/if_ec.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ec.c,v 1.19 2011/11/19 22:51:21 tls Exp $ */ +/* $NetBSD: if_ec.c,v 1.20 2012/02/02 19:43:00 tls Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,11 +34,10 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.19 2011/11/19 22:51:21 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.20 2012/02/02 19:43:00 tls Exp $"); #include "opt_inet.h" #include "opt_ns.h" -#include "rnd.h" #include <sys/param.h> #include <sys/systm.h> @@ -49,9 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.19 2011/11/19 22:51:21 tls Exp $"); #include <sys/syslog.h> #include <sys/device.h> #include <sys/endian.h> -#if NRND > 0 #include <sys/rnd.h> -#endif #include <net/if.h> #include <net/if_dl.h> @@ -101,9 +98,7 @@ struct ec_softc { u_char sc_colliding; /* nonzero if the net is colliding */ uint32_t sc_backoff_seed; /* seed for the backoff PRNG */ -#if NRND > 0 krndsource_t rnd_source; -#endif }; /* Macros to read and write the CSR. */ @@ -249,10 +244,8 @@ ec_attach(device_t parent, device_t self, void *aux) bus_intr_establish(mbma->mbma_bustag, mbma->mbma_pri, IPL_NET, 0, ec_intr, sc); -#if NRND > 0 rnd_attach_source(&sc->rnd_source, device_xname(self), RND_TYPE_NET, 0); -#endif } /* |
