summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2008-06-03 15:00:57 +0000
committerjmcneill <jmcneill@NetBSD.org>2008-06-03 15:00:57 +0000
commitb9f9379e749d8a8dc6a11fb2ca8e196870945b0f (patch)
tree60361884fb64bf4204cf7fe4aec8534ba475189b /sys/dev
parent457a3f89428354a3e66002860bf010879e162bee (diff)
Add SME_POLL_ONLY flag, which informs sme to only refresh the sensor when
it is polled (and not from GTREDATA).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sysmon/sysmon_envsys.c7
-rw-r--r--sys/dev/sysmon/sysmonvar.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/sysmon/sysmon_envsys.c b/sys/dev/sysmon/sysmon_envsys.c
index ca517d7b5f2..f350eb97c39 100644
--- a/sys/dev/sysmon/sysmon_envsys.c
+++ b/sys/dev/sysmon/sysmon_envsys.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys.c,v 1.83 2008/04/02 11:19:22 xtraeme Exp $ */
+/* $NetBSD: sysmon_envsys.c,v 1.84 2008/06/03 15:00:57 jmcneill 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.83 2008/04/02 11:19:22 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.84 2008/06/03 15:00:57 jmcneill Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -361,7 +361,8 @@ sysmonioctl_envsys(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
}
if (tred->sensor < sme->sme_nsensors) {
- if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0) {
+ if ((sme->sme_flags & SME_DISABLE_REFRESH) == 0 &&
+ (sme->sme_flags & SME_POLL_ONLY) == 0) {
mutex_enter(&sme->sme_mtx);
(*sme->sme_refresh)(sme, edata);
mutex_exit(&sme->sme_mtx);
diff --git a/sys/dev/sysmon/sysmonvar.h b/sys/dev/sysmon/sysmonvar.h
index 1b460227e17..6eff3b385cc 100644
--- a/sys/dev/sysmon/sysmonvar.h
+++ b/sys/dev/sysmon/sysmonvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmonvar.h,v 1.26 2008/04/04 10:10:20 hannken Exp $ */
+/* $NetBSD: sysmonvar.h,v 1.27 2008/06/03 15:00:57 jmcneill Exp $ */
/*-
* Copyright (c) 2000 Zembu Labs, Inc.
@@ -77,6 +77,7 @@ struct sysmon_envsys {
#define SME_INIT_REFRESH 0x00000008 /* call sme_refresh() after
interrupts are enabled in
the autoconf(9) process. */
+#define SME_POLL_ONLY 0x00000010 /* only poll sme_refresh */
void *sme_cookie; /* for ENVSYS back-end */