No need to hold Giant will harvesting RNG data; change callout_init so

this no longer happens for callbacks.
This commit is contained in:
Sam Leffler 2002-10-11 17:34:00 +00:00
parent f556e83b61
commit 526dee0415
2 changed files with 4 additions and 2 deletions

View File

@ -470,7 +470,8 @@ hifn_attach(device_t dev)
if (sc->sc_flags & (HIFN_HAS_PUBLIC | HIFN_HAS_RNG))
hifn_init_pubrng(sc);
callout_init(&sc->sc_tickto, 0);
/* NB: 1 means the callout runs w/o Giant locked */
callout_init(&sc->sc_tickto, 1);
callout_reset(&sc->sc_tickto, hz, hifn_tick, sc);
return (0);

View File

@ -426,7 +426,8 @@ ubsec_attach(device_t dev)
sc->sc_rnghz = hz / 100;
else
sc->sc_rnghz = 1;
callout_init(&sc->sc_rngto, 0);
/* NB: 1 means the callout runs w/o Giant locked */
callout_init(&sc->sc_rngto, 1);
callout_reset(&sc->sc_rngto, sc->sc_rnghz, ubsec_rng, sc);
skip_rng:
;