From 526dee04158838c44956357c1d92f0788ed55614 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 11 Oct 2002 17:34:00 +0000 Subject: [PATCH] No need to hold Giant will harvesting RNG data; change callout_init so this no longer happens for callbacks. --- sys/dev/hifn/hifn7751.c | 3 ++- sys/dev/ubsec/ubsec.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index 8909a095935e..2aad05a0915e 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -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); diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index 415bd4926b29..95b629f66252 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -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: ;