mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +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:
parent
f556e83b61
commit
526dee0415
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104918
@ -470,7 +470,8 @@ hifn_attach(device_t dev)
|
|||||||
if (sc->sc_flags & (HIFN_HAS_PUBLIC | HIFN_HAS_RNG))
|
if (sc->sc_flags & (HIFN_HAS_PUBLIC | HIFN_HAS_RNG))
|
||||||
hifn_init_pubrng(sc);
|
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);
|
callout_reset(&sc->sc_tickto, hz, hifn_tick, sc);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -426,7 +426,8 @@ ubsec_attach(device_t dev)
|
|||||||
sc->sc_rnghz = hz / 100;
|
sc->sc_rnghz = hz / 100;
|
||||||
else
|
else
|
||||||
sc->sc_rnghz = 1;
|
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);
|
callout_reset(&sc->sc_rngto, sc->sc_rnghz, ubsec_rng, sc);
|
||||||
skip_rng:
|
skip_rng:
|
||||||
;
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user