Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/cavium/octeon_rnd.c
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | octeon_rnd_harvest(void *arg) | ||||
struct octeon_rnd_softc *sc; | struct octeon_rnd_softc *sc; | ||||
unsigned i; | unsigned i; | ||||
sc = arg; | sc = arg; | ||||
for (i = 0; i < OCTEON_RND_WORDS; i++) | for (i = 0; i < OCTEON_RND_WORDS; i++) | ||||
sc->sc_entropy[i] = cvmx_rng_get_random64(); | sc->sc_entropy[i] = cvmx_rng_get_random64(); | ||||
/* MarkM: FIX!! Check that this does not swamp the harvester! */ | /* MarkM: FIX!! Check that this does not swamp the harvester! */ | ||||
random_harvest_queue(sc->sc_entropy, sizeof sc->sc_entropy, | random_harvest_queue(sc->sc_entropy, sizeof sc->sc_entropy, RANDOM_PURE_OCTEON); | ||||
(sizeof(sc->sc_entropy)*8)/2, RANDOM_PURE_OCTEON); | |||||
callout_reset(&sc->sc_callout, hz * 5, octeon_rnd_harvest, sc); | callout_reset(&sc->sc_callout, hz * 5, octeon_rnd_harvest, sc); | ||||
} | } |