diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/via.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c index 9060e5aa67c..6352f08f20f 100644 --- a/sys/arch/i386/i386/via.c +++ b/sys/arch/i386/i386/via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via.c,v 1.11 2007/08/07 09:45:24 markus Exp $ */ +/* $OpenBSD: via.c,v 1.12 2007/08/14 20:10:05 henric Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -538,6 +538,9 @@ viac3_rnd(void *v) struct timeout *tmo = v; unsigned int *p, i, rv, creg0, len = VIAC3_RNG_BUFSIZ; static int buffer[VIAC3_RNG_BUFSIZ + 2]; /* XXX why + 2? */ +#ifdef MULTIPROCESSOR + int s = splipi(); +#endif creg0 = rcr0(); /* Permit access to SIMD/FPU path */ lcr0(creg0 & ~(CR0_EM|CR0_TS)); @@ -553,6 +556,10 @@ viac3_rnd(void *v) lcr0(creg0); +#ifdef MULTIPROCESSOR + splx(s); +#endif + for (i = 0, p = buffer; i < VIAC3_RNG_BUFSIZ; i++, p++) add_true_randomness(*p); |