Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/1401b7245dbd
branches:  netbsd-8
changeset: 934225:1401b7245dbd
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jun 07 16:41:24 2020 +0000

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

        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 2a24067015d6 -r 1401b7245dbd sys/dev/sysmon/sysmon_envsys.c
--- a/sys/dev/sysmon/sysmon_envsys.c    Sun Jun 07 12:23:43 2020 +0000
+++ b/sys/dev/sysmon/sysmon_envsys.c    Sun Jun 07 16:41:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysmon_envsys.c,v 1.139.10.1 2017/09/23 17:22:48 snj Exp $     */
+/*     $NetBSD: sysmon_envsys.c,v 1.139.10.2 2020/06/07 16:41:24 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.139.10.1 2017/09/23 17:22:48 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.139.10.2 2020/06/07 16:41:24 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -824,16 +824,6 @@
        if (error == 0) {
                nevent = 0;
 
-               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
                 */
@@ -889,6 +879,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