Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sysmon Don't queue sysmon refresh until the rndsourc...
details: https://anonhg.NetBSD.org/src/rev/bf53d6c39d0f
branches: trunk
changeset: 972656:bf53d6c39d0f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Jun 01 21:54:47 2020 +0000
description:
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 16a747fff4f4 -r bf53d6c39d0f sys/dev/sysmon/sysmon_envsys.c
--- a/sys/dev/sysmon/sysmon_envsys.c Mon Jun 01 18:55:37 2020 +0000
+++ b/sys/dev/sysmon/sysmon_envsys.c Mon Jun 01 21:54:47 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys.c,v 1.144 2019/03/26 15:50:23 bad Exp $ */
+/* $NetBSD: sysmon_envsys.c,v 1.145 2020/06/01 21:54:47 riastradh 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.144 2019/03/26 15:50:23 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.145 2020/06/01 21:54:47 riastradh 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