1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104918
2 changed files with 4 additions and 2 deletions
sys/dev

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:
;