CVS commit: src/sys/dev/sysmon

2020-12-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Dec 18 01:46:40 UTC 2020

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
Use sel{remove,record}_knote().


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2020-10-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 30 22:19:19 UTC 2020

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2020-06-08 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jun  8 20:18:13 UTC 2020

Modified Files:
src/sys/dev/sysmon: swsensor.c sysmon_envsys.c sysmon_envsys_util.c
sysmon_power.c

Log Message:
Update for proplib(3) API changes.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sysmon/swsensor.c
cvs rdiff -u -r1.145 -r1.146 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sysmon/sysmon_envsys_util.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2020-06-01 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun  1 21:54:47 UTC 2020

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2019-03-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Mar 27 09:52:16 UTC 2019

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Don't create the driver's workqueue twice!

The driver is modular, so its modcmd(MOULE_CMD_INIT) always gets called
whether or not the driver is built-in to the kernel.  The modcmd init
code always calls swwdogattach() which creates the workqueue.  Therefore
there's no need to also create it in swwdog_attach() (used to attach a
device instance).


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2019-03-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Tue Mar 26 15:50:23 UTC 2019

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
in sysmon_envsys_unregister(): loop over sme_sensors_list with TAILQ_FIRST
instead of TAILQ_FOREACH.

sysmon_envsys_sensor_detach() removes the sensor from sme_sensors_list.
Hence using TAILQ_FOREACH is not safe.

Suggested by thorpej and jmcneill.  Thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2018-05-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat May 26 21:15:46 UTC 2018

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Avoid dereferencing NULL if we attempt to look up an known unit type.


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2018-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May  5 00:14:28 UTC 2018

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Defend against some table-lookup-not-found errors.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2017-09-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Sep 11 06:02:09 UTC 2017

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmonvar.h

Log Message:
Improve tracking of the state of an event's callout, and protect all
queries or modifications of the state with the sme_mtx mutex.

Detach the rndsrc before re-attaching it (with potentially new values).

Clean up some lock-ordering issues.

And a couple of KNF issues for good measure!

Should address PR kern/52533

XXX Pullup-8 along with the previous fixes from msaitoh@
XXX http://mail-index.netbsd.org/source-changes/2017/09/06/msg088028.html
~
~


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2017-09-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Sep  6 11:08:54 UTC 2017

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c

Log Message:
 Fixes a problem that some driver(e.g. acpitz(4) or coretemp(5)) which
use sysmon_envsys sleep waiting at "rndsrc" when "drvctl -d".
Don't call rnd_detach_source() in sme_remove_event() which is called
from sme_event_unregister_all(). Instead, call rnd_detach_source() in
sysmon_envsys_sensor_detach() and call sysmon_envsys_sensor_detach()
before sme_event_unregister_sensor(). Each sensor(envsys_data) has each
rnd_src, but some sme_events point to the same rnd_src in a sensor.
Calling rnd_detach_souce() twice with the same rnd_src brokes a reference
count in rnd_src. OK'd by pgoyette@.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-12-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Dec 14 01:08:47 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_power.c sysmon_wdog.c

Log Message:
sysmon's components need to be MODULE_CLASS_DRIVER so they will get
initialized before we configure/initialize any devices that interact
with them.

Thanks, marty!


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/sysmon/sysmon_wdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-12-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sun Dec 13 17:41:48 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Note the sensor number in the error output.  Useful for drivers adding
multiple sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-10-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Oct 15 13:35:30 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
As proposed in
https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
don't sleep on sme->sme_mtx in the callout but use mutex_tryenter()
and just reschedule the callout if we can't get the mutex now.
This fixes a deadlock which can happen if the backed wants to
sleep with timeout (e.g. cv_timedwait()) as the backed is called with
sme->sme_mtx held.

This is a stopgap measure for netbsd-7; sysmon should be changed to not
sleep (or call a backend which will sleep) with mutexes held.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-06-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 23 19:22:56 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Separate the two conditions for the KASSERT, so we can tell which
one occurred.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-06-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Jun 23 10:41:42 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Fix the KASSERT - we want to make sure that _both_ pointers are non-NULL,
n ot just that one or the other is non-NULL!


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-06-04 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jun  5 00:53:47 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_wdog.c

Log Message:
Move callout_init to wdog_preinit


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/sysmon/sysmon_wdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-05-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 12 10:20:14 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Finish work started in previous commit.  Ensure that initialization
code is only called once for built-in variants of the module.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-05-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May 12 02:38:00 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Don't manipulate the autoconfig databases for built-in module.

Thanks, christos!


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-05-05 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May  5 09:22:33 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Optimize a bit - don't re-enter the mutex if we're just going to exit.

While here, remove some parens around a return value.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue May  5 00:28:25 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
If module_autoload() returns an error, just return that value instead
of overwriting with ENODEV.

Thanks, christos!


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon May  4 23:50:36 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
If autoload of the subcomponent module fails, don't try to call its
open routine.  Just return an error.

Hopefully this will fix the recently reported issues with atf tests
running on xen guest.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Apr 29 03:27:27 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
At suggestion from riastradh@ ...

Remove auto_configure(9) goop from sysmon device.  It does make things
a bit cleaner, and also reduces source code by about 10%.

Tested via QEMU with no obvious side-effects.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 28 11:58:50 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_taskq.c

Log Message:
sysmon_task_queue_sched needs to RUN_ONCE(tq_preinit) as well, it can
be called from sysmon_envsys_register() early.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/sysmon/sysmon_taskq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:55:24 UTC 2015

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Remove another debug printf() that snuck in.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:40:09 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c sysmon_envsys.c sysmon_power.c
sysmon_wdog.c

Log Message:
Correctly check return status when registering with pmf


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sysmon/sysmon.c
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sysmon/sysmon_wdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 23:16:37 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Fix typo - thanks, riz@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 22:46:31 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
Register the sysmon pseudo-device with power management framework so we
can properly suspend the system.

Thanks, mrg, for pointing this out.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr 25 14:06:58 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
make things boot again, from martin.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 02:41:42 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Use tabs for indentation.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 25 00:54:14 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Release the mutex in the error path.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 24 19:49:24 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
We only need the _cd when we are a module.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-24 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 24 11:34:14 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
The sysmon_envsys module also depends on sysmon_power (for delivery of
sensor events to userland).


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 24 03:35:49 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c

Log Message:
With new (corrected) configuration declarations file, the cdevsw is
already included by config.  So, for built-in sysmon module we don't
need to add the cdevsw to the table.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/sysmon/sysmon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 24 03:33:43 UTC 2015

Modified Files:
src/sys/dev/sysmon: files.sysmon

Log Message:
Update configuration definitions for new sysmon


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/files.sysmon

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 24 03:32:25 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Remove a left-over debugging printf()


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 24 00:31:04 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_taskq.c sysmon_taskq.h

Log Message:
This really does need to return an error code, so change the
sysmon_task_queue_fini() function to have a non-void type.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sysmon/sysmon_taskq.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/sysmon/sysmon_taskq.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-23 Thread Alistair G. Crooks
Module Name:src
Committed By:   agc
Date:   Fri Apr 24 00:04:47 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_taskq.c

Log Message:
It's a function returning void; don't return an error code.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/sysmon/sysmon_taskq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-23 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Apr 23 23:22:03 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon.c sysmon_envsys.c sysmon_power.c
sysmon_taskq.c sysmon_wdog.c sysmonvar.h
Removed Files:
src/sys/dev/sysmon: sysmonconf.h

Log Message:
Modularize sysmon and its components


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/sysmon/sysmon.c
cvs rdiff -u -r1.130 -r1.131 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/sysmon/sysmon_power.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/sysmon_taskq.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sysmon/sysmon_wdog.c
cvs rdiff -u -r1.3 -r0 src/sys/dev/sysmon/sysmonconf.h
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 18 22:56:52 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Remove some debugging printf()s that were erroneously committed.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-18 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Apr 18 14:44:44 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c sysmonvar.h

Log Message:
use unsigned type for flag bits.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 18 10:49:32 UTC 2015

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Update attach/detach routines and provide MODULE interface.

Confirmed that atf tests (which run via rump) still pass, and also
confirmed that panic/reboot work in both monolithic kernel and
loaded module.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 15:31:17 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
another missing free dict.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  4 15:29:59 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
don't forget to free the dictionary.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-04-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  4 15:25:16 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
Free ped if we can't hand it to the power daemon.

Found by Brainy, reported by maxv@.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2015-03-14 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Mar 14 09:52:49 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmonvar.h

Log Message:
Add a counter of busy events and stop enqueueing more work if a device is busy.
Protect this counter with a new short time lock "sme_work_mtx" and
keep "sme_mtx" as long time lock.

Removes a deadlock where an active event holds "sme_mtx", the callout
"sme_events_check" blocks on "sme_mtx" and callout processing stops.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2014-11-23 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sun Nov 23 10:00:20 UTC 2014

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c
sysmon_envsysvar.h

Log Message:
Pull workqueue_destroy out of sme->sme_mtx

workqueue_destroy may sleep so we shouldn't run it with holding a mutex.

Requested by riastradh@.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2014-11-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Nov 22 15:09:30 UTC 2014

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Replace callout_stop with callout_halt

In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.

In this case, we need to pass an interlock to callout_halt to wait for
the callout complete. And also we make sure that SME_CALLOUT_INITIALIZED
is unset before calling callout_halt to prevent the callout from calling
callout_schedule. This is the same as what we did in sys/netinet6/mld6.c@1.61.

Reviewed by riastradh@.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2014-11-22 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Nov 22 15:00:05 UTC 2014

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c sysmonvar.h

Log Message:
Kill sme_callout_mtx and use sme_mtx instead

We can use sme_mtx for the callout as well. Actually we should do so
because sme_events_list and some other data that are touched in the
callout should be protected by sme_mtx, not sme_callout_mtx.

Discussed with riastradh@ in 
http://mail-index.netbsd.org/tech-kern/2014/11/11/msg017956.html


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2014-11-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Nov 21 23:28:57 UTC 2014

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
Explicitly compare to NULL to show clang that the bool conversion is
intentional, even if it is always true in case of the arrays.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2014-04-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Apr 13 13:19:50 UTC 2014

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
If we pmf_register on attach, we should pmf_deregister on detach.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2013-09-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 15 14:40:56 UTC 2013

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2013-01-23 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Wed Jan 23 18:04:34 UTC 2013

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Fix spelling, grammar, typos.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-12-14 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Dec 14 15:33:20 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Constify


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-12-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Dec 14 03:31:10 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsysvar.h

Log Message:
The sensor limit values were moved out of the event structure and into the
per-sensor structure a long time ago.  Garbage collect the old structure
member which is now unused.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-12-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Dec 11 15:39:06 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c sysmonvar.h

Log Message:
Replace a couple of many-line #define with equivalent code loops.

No functional change intended, and atf tests (using swsensor(4)) still
pass 100%


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 29 10:29:46 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Remove trailing white space(s) from name of random source.
And also, changind space(s) in the middle with '-'.
PR#47232.


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-10-30 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Oct 31 05:42:48 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
in sme_battery_check():
- don't assume that all batteries have exactly one ENVSYS_INDICATOR
- check capacity and charge sensors for ENVSYS_SVALID before using them
now this works on macppc


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-09-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Sep  6 12:59:00 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsysvar.h

Log Message:
opt_envsys.h needs #ifdef _KERNEL_OPT
( thanks martin@ )


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-09-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Sep  6 12:21:40 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c

Log Message:
Remove (commented-out) definitions for debugging - thanks to macallan@
for defflagging these.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-09-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Sep  6 12:10:29 UTC 2012

Modified Files:
src/sys/dev/sysmon: files.sysmon sysmon_envsysvar.h

Log Message:
defflag debug #defines


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/sysmon/files.sysmon
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-08-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Aug 27 21:42:04 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c sysmon_envsys_tables.c
sysmon_envsysvar.h

Log Message:
1. Enable use of FMONSTCHANGED events for INDICATOR sensors
2. Update handling of FMONCRITICAL event reporting.   The state
   transition does not require a corresponding change in value.

With these changes, you can now have an INDICATOR sensor that
reports the presence or absence of a device, and (if the device
is present) separately monitor it for proper functioning.

Should address the concerns expressed recently with the commit
of changes to wmi(4) BBU handling.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sysmon/sysmon_envsys_tables.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-08-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Aug 27 20:29:12 UTC 2012

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Add hw.swsensor.state variable for additional control capability.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-08-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Aug 27 14:15:52 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Fix indentation.  No code change.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-08-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Aug 27 14:08:36 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Simplify some logic - no functional change intended.

While here, clean up a couple of comments.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-07-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul 19 13:31:06 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Make sure to re-add the sensor as an entropy source after user request
to reset (via envstat -S)


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-07-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul 19 13:30:01 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
If previously there was only a dummy event entry (to force refresh for
entropy gathering), allow it to be updated for the current request to
add a real entry.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-07-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jul 18 20:50:40 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Release the mutex before taking a quick exit.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jul 16 13:55:01 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmonvar.h

Log Message:
Extend previous changes so that even sensors which don't use a refresh()
callback to update the value can be polled to provide rnd(4) entropy.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.100 -r1.101 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-07-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 15 18:33:07 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmonvar.h

Log Message:
If a sensor is flagged as capable of providing rnd(4) with entropy,
hook the sensor into rnd subsystem, and make sure we periodically
refresh the sensor whether or not it is being actively monitored.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.99 -r1.100 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-07-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 15 17:41:39 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c
sysmon_envsysvar.h

Log Message:
When unregistering a sensor device, make sure we unregister and delete
all the associated events.


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2012-02-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 18 01:08:00 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsysvar.h

Log Message:
Don't export sysmon_envsys_list as a common.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-07-22 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Jul 22 14:21:40 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_power.c

Log Message:
Ensure events come off the list in the same order they went on.
Hotkey press/release events now happen in the correct order.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/sysmon/sysmon_power.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jun 19 15:52:48 UTC 2011

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Use {...} to prevent premature exit from initialization function - this
lets the atf tests run again.

Move validation of current value vs min/max into the refresh routine
where it will get checked every time, not just at initialization.

While here, do a little more housekeeping:
  - Retrieve numeric property value once
  - Ensure that a numeric-specified sensor type is valid
  - printout any unrecognized properties (DEBUG only)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 19 11:40:26 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Instead of crashing, print a usable error message when a driver eroneously
does not properly initialize sensor state.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-18 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jun 19 05:26:32 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_tables.c

Log Message:
Pass table_id to sme_find_table().


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/sysmon/sysmon_envsys_tables.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-18 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun Jun 19 05:17:38 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_tables.c

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sysmon/sysmon_envsys_tables.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 19 04:23:18 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_tables.c

Log Message:
simplify and don't deref NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sysmon/sysmon_envsys_tables.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jun 19 04:08:48 UTC 2011

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Use correct routine to retrieve string value from prop-dictionary


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jun 19 03:09:44 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_tables.c sysmon_envsysvar.h

Log Message:
Add routine to lookup description tables by description instead of by
type.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sysmon/sysmon_envsys_tables.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun 15 13:34:13 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Previous fix broke the setting of current value for Indicator and
Battery-Charge sensors.  Fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  8 18:22:24 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsysvar.h

Log Message:
Factor out some duplicated code to simplify maintenance.  Reduces
the source file by ~100 lines, and amd64 object file shrinks by
~650 bytes.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-08 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jun  8 16:14:57 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Restrict limit monitoring for Indicator sensors as well as for
Battery-charge sensors.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jun  4 13:26:52 UTC 2011

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Remove ability to the value_avg since it no longer exists


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jun  4 13:24:33 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmonvar.h

Log Message:
Since nothing actually records or maintains an average sensor value,
remove value_avg from the prop_dict.  We can't completely remove it
because there's one driver that uses this field for its own private
purposes, so for now we just rename the member.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-06-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jun  4 02:02:55 UTC 2011

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Enable creation of value_{max,min,avg} entries via the proplist, as well
as setting the ENVSYS_FPERCENT flag


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2011-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  4 01:51:06 UTC 2011

Modified Files:
src/sys/dev/sysmon: sysmon_wdog.c sysmonvar.h

Log Message:
add support for autostarting watchdogs (wdog was started by firmware
and can't be disabled).  Add critical pool hooks for kernel tickled
watchdogs.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/sysmon/sysmon_wdog.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/sysmon/sysmonvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-29 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec 30 04:00:00 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c
sysmon_envsysvar.h

Log Message:
When the user updates the sensor device's refresh timer, reset the
callout immediately rather than waiting for the previous timer to
expire.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 17 13:37:38 UTC 2010

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
use aprint


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Dec 16 16:08:57 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Be sure to always initialize props variable to a sensible value.
Fix a problem with envstat -S call which was installing bogus/random
limits.

ok pgoyette.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Dec 15 17:17:17 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c
sysmon_envsys_tables.c sysmon_envsysvar.h

Log Message:
Extract searching of description tables into a single function, rather
than duplicating the code every time.  Minor reduction in code size
(about 1200 bytes on amd64), no change in functionality.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.95 -r1.96 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sysmon/sysmon_envsys_tables.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-11 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Dec 11 15:17:16 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Handle removal of limit properties correctly, even for sensors that
provide their own internal limit(s).


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-07 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Dec  8 00:09:14 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c

Log Message:
When removing properties (as in envstat -S), clear the flags that track
whether the properties actually exist.

When setting new limit values, don't complain/ignore about duplicate
values if the associated flag bits (indicating that the limit is valid)
are not set.

These two fixes together should fix a problem reported in private Email
by njoly@ a couple months ago.  Issue replicated and solution tested
using my recent swsensor pseudo-device running inside qemu world!


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-12-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Dec  6 23:26:44 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
Make this compile when "options ENVSYS_OBJECTS_DEBUG" is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-11-11 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Nov 11 21:55:04 UTC 2010

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
Apparently swwdog reboot hasn't worked in several years since it
tried to cpu_reboot() from a callout.  Make it reboot from a workq
instead.

problem made manifest
by atf test
rumpfs unmount flush
caused issue to un-shush

tested: rump kernel (tests/dev/sysmon) and qemu


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-10-23 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Oct 23 11:24:16 UTC 2010

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Revert 1.2 apart from incorrect comment.  the devattach() routine
is of course still used by kernel&config pseudodev.

pointed out by jakllsch


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-10-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 20 19:21:05 UTC 2010

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
Set sensor state to valid upon refresh to make things generally work.

pgoyette ok


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-10-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Oct 20 18:50:47 UTC 2010

Modified Files:
src/sys/dev/sysmon: swsensor.c

Log Message:
remove unused routine (per comment)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/sysmon/swsensor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-09-21 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Sep 22 00:13:55 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
1. Don't try to call the driver's get_limits routine if it doesn't have
   one.  Fixes a panic reported by njoly@ in private Email

2. Acquire the device before checking whether or not the get_limits
   routine exists.

XXX There's still a bug in here somewhere that prevents setting of
XXX limit values after using 'envstat -S'


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-08-06 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Aug  6 16:02:56 UTC 2010

Modified Files:
src/sys/dev/sysmon: swwdog.c

Log Message:
* fix logic inversion in swwdog_reboot (and the sysctl).
* attach sysctl in constructor instead of as a link set to give it
  a chance to work in a module
* teardown sysctl when driver is detached to avoid dangling pointer


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sysmon/swwdog.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/sysmon

2010-04-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Apr 10 19:01:01 UTC 2010

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c
sysmon_envsysvar.h

Log Message:
When removing sensor properties with envstat -S, ensure that drivers
which could have modified hardware state are informed so that original
state can be restored.

Welcome to 5.99.27


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/sysmon/sysmon_envsys.c
cvs rdiff -u -r1.91 -r1.92 src/sys/dev/sysmon/sysmon_envsys_events.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/sysmon/sysmon_envsysvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >