Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern entropy(9): Establish the softint a little earlier.



details:   https://anonhg.NetBSD.org/src/rev/a1775ec2ed96
branches:  trunk
changeset: 363962:a1775ec2ed96
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Mar 18 23:37:06 2022 +0000

description:
entropy(9): Establish the softint a little earlier.

Just need to wait until softint_establish and high-priority xcalls
will work, no later than that.  Doing this earlier gives us slightly
more of a chance to ensure cprng_fast and ssp get entropy from
hardware RNG devices that rely on interrupts.

diffstat:

 sys/kern/init_main.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 37a4e43e9ddc -r a1775ec2ed96 sys/kern/init_main.c
--- a/sys/kern/init_main.c      Fri Mar 18 23:36:57 2022 +0000
+++ b/sys/kern/init_main.c      Fri Mar 18 23:37:06 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init_main.c,v 1.536 2022/01/26 11:48:54 andvar Exp $   */
+/*     $NetBSD: init_main.c,v 1.537 2022/03/18 23:37:06 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.536 2022/01/26 11:48:54 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.537 2022/03/18 23:37:06 riastradh Exp $");
 
 #include "opt_cnmagic.h"
 #include "opt_ddb.h"
@@ -552,6 +552,9 @@
        evcnt_attach_legacy_intrcnt();
 #endif
 
+       /* Enable deferred processing of RNG samples */
+       rnd_init_softint();
+
        /* Once all CPUs are detected, initialize the per-CPU cprng_fast.  */
        cprng_fast_init();
 
@@ -574,9 +577,6 @@
        /* Get the threads going and into any sleeps before continuing. */
        yield();
 
-       /* Enable deferred processing of RNG samples */
-       rnd_init_softint();
-
        vmem_rehash_start();    /* must be before exec_init */
 
        /* Initialize exec structures */



Home | Main Index | Thread Index | Old Index