Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/dev/sysmon Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/76840c26864a
branches:  netbsd-7
changeset: 934228:76840c26864a
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jun 07 16:43:40 2020 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1733):

        sys/dev/sysmon/sysmon_envsys.c: revision 1.145

Don't queue sysmon refresh until the rndsource is attached.

Using the rndsource, as refreshing the sensors will do, is not
allowed until _after_ rnd_source_attach.

XXX pullup-7
XXX pullup-8
XXX pullup-9

diffstat:

 sys/dev/sysmon/sysmon_envsys.c |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (53 lines):

diff -r a11af919ba35 -r 76840c26864a sys/dev/sysmon/sysmon_envsys.c
--- a/sys/dev/sysmon/sysmon_envsys.c    Sun Jun 07 12:26:22 2020 +0000
+++ b/sys/dev/sysmon/sysmon_envsys.c    Sun Jun 07 16:43:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysmon_envsys.c,v 1.127.2.3 2017/10/24 09:25:26 snj Exp $      */
+/*     $NetBSD: sysmon_envsys.c,v 1.127.2.4 2020/06/07 16:43:40 martin Exp $   */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.3 2017/10/24 09:25:26 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.4 2020/06/07 16:43:40 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -765,16 +765,6 @@
                nevent = 0;
                sysmon_task_queue_init();
 
-               if (sme->sme_flags & SME_INIT_REFRESH) {
-                       sysmon_task_queue_sched(0, sme_initial_refresh, sme);
-                       DPRINTF(("%s: scheduled initial refresh for '%s'\n",
-                               __func__, sme->sme_name));
-               }
-               SLIST_FOREACH(evdv, &sme_evdrv_list, evdrv_head) {
-                       sysmon_task_queue_sched(0,
-                           sme_event_drvadd, evdv->evdrv);
-                       nevent++;
-               }
                /*
                 * Hook the sensor into rnd(4) entropy pool if requested
                 */
@@ -830,6 +820,17 @@
                                    rnd_type, rnd_flag);
                        }
                }
+
+               if (sme->sme_flags & SME_INIT_REFRESH) {
+                       sysmon_task_queue_sched(0, sme_initial_refresh, sme);
+                       DPRINTF(("%s: scheduled initial refresh for '%s'\n",
+                               __func__, sme->sme_name));
+               }
+               SLIST_FOREACH(evdv, &sme_evdrv_list, evdrv_head) {
+                       sysmon_task_queue_sched(0,
+                           sme_event_drvadd, evdv->evdrv);
+                       nevent++;
+               }
                DPRINTF(("%s: driver '%s' registered (nsens=%d nevent=%d)\n",
                    __func__, sme->sme_name, sme->sme_nsensors, nevent));
        }



Home | Main Index | Thread Index | Old Index