The NetBSD Project

CVS log for src/sys/dev/sysmon/sysmon_envsys.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / sysmon

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.151 / (download) - annotate - [select for diffs], Fri May 20 21:31:24 2022 UTC (22 months, 3 weeks ago) by andvar
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored)

s/appropiate/appropriate/ in comments and readme file.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Dec 31 14:30:04 2021 UTC (2 years, 3 months ago) by riastradh
Branch: MAIN
Changes since 1.149: +21 -21 lines
Diff to previous 1.149 (colored)

sysmon(9): Fix callout/thread synchronization.

Callout may ONLY take sme_work_mtx, at IPL_SOFTCLOCK; MUST NOT touch
sme_mtx at IPL_NONE.  All state the callout needs is serialized by
sme_work_mtx now:

- calls to sme_schedule_callout
- calls to sme_schedule_halt
- struct sysmon_envsys::sme_events_timeout
- struct sysmon_envsys::sme_events_list
- struct sysmon_envsys::sme_callout_state
- struct envsys_data::flags
  => yes, this is a little silly -- used for ENVSYS_FNEED_REFRESH
  => should maybe separate the static driver-defined features from
     the state flags needed by sysmon_envsys but not important now

Sleeping under sme_work_mtx (except on other adaptive locks at
IPL_SOFTCLOCK) is forbidden.  Calling out to the driver under
sme_work_mtx is forbidden.

This should properly fix:

https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
PR kern/56592

Revision 1.149 / (download) - annotate - [select for diffs], Fri Dec 31 11:05:41 2021 UTC (2 years, 3 months ago) by riastradh
Branch: MAIN
Changes since 1.148: +51 -54 lines
Diff to previous 1.148 (colored)

sysmon: Delete trailing whitespace.  No functional change intended.

Revision 1.148 / (download) - annotate - [select for diffs], Tue Sep 7 13:24:46 2021 UTC (2 years, 7 months ago) by andvar
Branch: MAIN
Changes since 1.147: +3 -3 lines
Diff to previous 1.147 (colored)

s/aquire/acquire/ in comments, also one typo fix acqure->acquire.

Revision 1.147 / (download) - annotate - [select for diffs], Thu Jun 11 02:39:31 2020 UTC (3 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.146: +14 -14 lines
Diff to previous 1.146 (colored)

Update for proplib(3) API changes.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Jun 8 20:18:13 2020 UTC (3 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.145: +6 -6 lines
Diff to previous 1.145 (colored)

Update for proplib(3) API changes.

Revision 1.127.2.4 / (download) - annotate - [select for diffs], Sun Jun 7 16:43:40 2020 UTC (3 years, 10 months ago) by martin
Branch: netbsd-7
Changes since 1.127.2.3: +13 -12 lines
Diff to previous 1.127.2.3 (colored) to branchpoint 1.127 (colored) next main 1.128 (colored)

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

Revision 1.139.10.2 / (download) - annotate - [select for diffs], Sun Jun 7 16:41:24 2020 UTC (3 years, 10 months ago) by martin
Branch: netbsd-8
Changes since 1.139.10.1: +13 -12 lines
Diff to previous 1.139.10.1 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

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

Revision 1.144.4.1 / (download) - annotate - [select for diffs], Sun Jun 7 16:40:00 2020 UTC (3 years, 10 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.144: +13 -12 lines
Diff to previous 1.144 (colored) next main 1.145 (colored)

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

	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

Revision 1.145 / (download) - annotate - [select for diffs], Mon Jun 1 21:54:47 2020 UTC (3 years, 10 months ago) by riastradh
Branch: MAIN
Changes since 1.144: +13 -12 lines
Diff to previous 1.144 (colored)

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

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:33 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored) next main 1.144 (colored)

Sync with HEAD

Revision 1.144 / (download) - annotate - [select for diffs], Tue Mar 26 15:50:23 2019 UTC (5 years ago) by bad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored)

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!

Revision 1.141.2.2 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:02 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.141.2.1: +3 -3 lines
Diff to previous 1.141.2.1 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with HEAD

Revision 1.143 / (download) - annotate - [select for diffs], Sat May 26 21:15:46 2018 UTC (5 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored)

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

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Mon May 21 04:36:12 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.141: +8 -2 lines
Diff to previous 1.141 (colored)

Sync with HEAD

Revision 1.142 / (download) - annotate - [select for diffs], Sat May 5 00:14:28 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.141: +8 -2 lines
Diff to previous 1.141 (colored)

Defend against some table-lookup-not-found errors.

Revision 1.125.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:33 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.125.2.2: +134 -20 lines
Diff to previous 1.125.2.2 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

update from HEAD

Revision 1.127.2.3 / (download) - annotate - [select for diffs], Tue Oct 24 09:25:26 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.127.2.2: +3 -3 lines
Diff to previous 1.127.2.2 (colored) to branchpoint 1.127 (colored)

Fix fallout from ticket #1511:
It's rnd_detach_source, not rnd_detach_sources.

Revision 1.127.2.1.6.2 / (download) - annotate - [select for diffs], Tue Oct 24 09:24:53 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7-1
CVS Tags: netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE
Changes since 1.127.2.1.6.1: +3 -3 lines
Diff to previous 1.127.2.1.6.1 (colored) to branchpoint 1.127.2.1 (colored) next main 1.127.2.2 (colored)

Fix fallout from ticket #1511:
It's rnd_detach_source, not rnd_detach_sources.

Revision 1.127.2.1.2.2 / (download) - annotate - [select for diffs], Tue Oct 24 09:24:32 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7-0
Changes since 1.127.2.1.2.1: +3 -3 lines
Diff to previous 1.127.2.1.2.1 (colored) to branchpoint 1.127.2.1 (colored) next main 1.127.2.2 (colored)

Fix fallout from ticket #1511:
It's rnd_detach_source, not rnd_detach_sources.

Revision 1.127.2.2 / (download) - annotate - [select for diffs], Mon Oct 23 18:57:12 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7
Changes since 1.127.2.1: +8 -2 lines
Diff to previous 1.127.2.1 (colored) to branchpoint 1.127 (colored)

Apply patch (requested by pgoyette in ticket #1511):
Detach the rndsrc before re-attaching it.

Revision 1.127.2.1.6.1 / (download) - annotate - [select for diffs], Mon Oct 23 18:57:09 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7-1
Changes since 1.127.2.1: +8 -2 lines
Diff to previous 1.127.2.1 (colored)

Apply patch (requested by pgoyette in ticket #1511):
Detach the rndsrc before re-attaching it.

Revision 1.127.2.1.2.1 / (download) - annotate - [select for diffs], Mon Oct 23 18:57:08 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7-0
Changes since 1.127.2.1: +8 -2 lines
Diff to previous 1.127.2.1 (colored)

Apply patch (requested by pgoyette in ticket #1511):
Detach the rndsrc before re-attaching it.

Revision 1.139.10.1 / (download) - annotate - [select for diffs], Sat Sep 23 17:22:48 2017 UTC (6 years, 6 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.139: +43 -9 lines
Diff to previous 1.139 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #281):
	sys/dev/sysmon/sysmon_envsys.c: 1.140-1.141
	sys/dev/sysmon/sysmon_envsys_events.c: 1.120-1.121
	sys/dev/sysmon/sysmonvar.h: 1.50
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@.
--
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

Revision 1.141 / (download) - annotate - [select for diffs], Mon Sep 11 06:02:09 2017 UTC (6 years, 7 months ago) by pgoyette
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.140: +36 -9 lines
Diff to previous 1.140 (colored)

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
~
~

Revision 1.140 / (download) - annotate - [select for diffs], Wed Sep 6 11:08:53 2017 UTC (6 years, 7 months ago) by msaitoh
Branch: MAIN
Changes since 1.139: +9 -2 lines
Diff to previous 1.139 (colored)

 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@.

Revision 1.128.2.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:58 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.128.2.2: +5 -5 lines
Diff to previous 1.128.2.2 (colored) to branchpoint 1.128 (colored) next main 1.129 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.139 / (download) - annotate - [select for diffs], Mon Dec 14 01:08:47 2015 UTC (8 years, 4 months ago) by pgoyette
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, netbsd-8-base, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored)

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!

Revision 1.138 / (download) - annotate - [select for diffs], Sun Dec 13 17:41:48 2015 UTC (8 years, 4 months ago) by jdc
Branch: MAIN
Changes since 1.137: +4 -4 lines
Diff to previous 1.137 (colored)

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

Revision 1.128.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:13 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.128.2.1: +120 -51 lines
Diff to previous 1.128.2.1 (colored) to branchpoint 1.128 (colored)

Sync with HEAD

Revision 1.137 / (download) - annotate - [select for diffs], Sat Apr 25 23:40:09 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.136: +10 -10 lines
Diff to previous 1.136 (colored)

Handle early initialization requirements - thanks martin@ and others

Revision 1.136 / (download) - annotate - [select for diffs], Sat Apr 25 14:06:58 2015 UTC (8 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.135: +21 -5 lines
Diff to previous 1.135 (colored)

make things boot again, from martin.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Apr 25 02:41:42 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

Use tabs for indentation.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Apr 25 00:54:14 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.133: +3 -2 lines
Diff to previous 1.133 (colored)

Release the mutex in the error path.

Revision 1.133 / (download) - annotate - [select for diffs], Fri Apr 24 11:34:14 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored)

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

Revision 1.132 / (download) - annotate - [select for diffs], Fri Apr 24 03:32:25 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.131: +2 -3 lines
Diff to previous 1.131 (colored)

Remove a left-over debugging printf()

Revision 1.131 / (download) - annotate - [select for diffs], Thu Apr 23 23:22:03 2015 UTC (8 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.130: +57 -4 lines
Diff to previous 1.130 (colored)

Modularize sysmon and its components

Revision 1.130 / (download) - annotate - [select for diffs], Mon Apr 13 16:33:25 2015 UTC (9 years ago) by riastradh
Branch: MAIN
Changes since 1.129: +3 -3 lines
Diff to previous 1.129 (colored)

Convert sys/dev to use <sys/rndsource.h>.

Revision 1.127.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 18:45:30 2015 UTC (9 years ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-1, netbsd-7-0
Changes since 1.127: +4 -2 lines
Diff to previous 1.127 (colored)

Pull up following revision(s) (requested by hannken in ticket #666):
	sys/dev/sysmon/sysmon_envsys.c: revision 1.129
	sys/dev/sysmon/sysmon_envsys_events.c: revision 1.114
	sys/dev/sysmon/sysmonvar.h: revision 1.46
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.

Revision 1.128.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:13 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.128: +4 -2 lines
Diff to previous 1.128 (colored)

Sync with HEAD

Revision 1.129 / (download) - annotate - [select for diffs], Sat Mar 14 09:52:49 2015 UTC (9 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.128: +4 -2 lines
Diff to previous 1.128 (colored)

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.

Revision 1.128 / (download) - annotate - [select for diffs], Sun Nov 23 10:00:20 2014 UTC (9 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.127: +15 -6 lines
Diff to previous 1.127 (colored)

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@.

Revision 1.125.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:50 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.125.2.1: +34 -4 lines
Diff to previous 1.125.2.1 (colored) to branchpoint 1.125 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.127 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:36 2014 UTC (9 years, 8 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.126: +34 -4 lines
Diff to previous 1.126 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.126.10.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:33 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.126: +34 -4 lines
Diff to previous 1.126 (colored) next main 1.127 (colored)

Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.125.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:32 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.125: +19 -2 lines
Diff to previous 1.125 (colored)

resync with head

Revision 1.117.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:33 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.117.2.2: +19 -2 lines
Diff to previous 1.117.2.2 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored)

sync with (a bit old) head

Revision 1.126 / (download) - annotate - [select for diffs], Thu Nov 29 10:29:45 2012 UTC (11 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-earlyentropy
Changes since 1.125: +19 -2 lines
Diff to previous 1.125 (colored)

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

Revision 1.117.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:03 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.117.2.1: +86 -56 lines
Diff to previous 1.117.2.1 (colored) to branchpoint 1.117 (colored)

sync with head

Revision 1.117.8.2 / (download) - annotate - [select for diffs], Fri Oct 19 17:28:01 2012 UTC (11 years, 5 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Changes since 1.117.8.1: +3 -3 lines
Diff to previous 1.117.8.1 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored)

Remove stray CR characters introduced in ticket #544.  From pgoyette.

Revision 1.117.8.1 / (download) - annotate - [select for diffs], Wed Oct 17 21:06:56 2012 UTC (11 years, 6 months ago) by riz
Branch: netbsd-6
Changes since 1.117: +3 -2 lines
Diff to previous 1.117 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #544):
	sys/dev/sysmon/sysmon_envsysvar.h: revision 1.42
	sys/dev/sysmon/sysmon_envsys_events.c: revision 1.99
	sys/dev/sysmon/sysmon_envsys.c: revision 1.119
When unregistering a sensor device, make sure we unregister and delete
all the associated events.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Sep 6 12:21:40 2012 UTC (11 years, 7 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.124: +2 -3 lines
Diff to previous 1.124 (colored)

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

Revision 1.124 / (download) - annotate - [select for diffs], Mon Aug 27 14:15:52 2012 UTC (11 years, 7 months ago) by pgoyette
Branch: MAIN
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored)

Fix indentation.  No code change.

Revision 1.123 / (download) - annotate - [select for diffs], Mon Aug 27 14:08:36 2012 UTC (11 years, 7 months ago) by pgoyette
Branch: MAIN
Changes since 1.122: +15 -16 lines
Diff to previous 1.122 (colored)

Simplify some logic - no functional change intended.

While here, clean up a couple of comments.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jul 19 13:31:06 2012 UTC (11 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.121: +18 -9 lines
Diff to previous 1.121 (colored)

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

Revision 1.121 / (download) - annotate - [select for diffs], Mon Jul 16 13:55:01 2012 UTC (11 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.120: +25 -39 lines
Diff to previous 1.120 (colored)

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.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Jul 15 18:33:07 2012 UTC (11 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.119: +46 -10 lines
Diff to previous 1.119 (colored)

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.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Jul 15 17:41:39 2012 UTC (11 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.118: +3 -2 lines
Diff to previous 1.118 (colored)

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

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:04 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.117: +4 -2 lines
Diff to previous 1.117 (colored)

sync with head

Revision 1.117.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:02 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.117: +4 -2 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

merge to -current.

Revision 1.118 / (download) - annotate - [select for diffs], Sat Feb 18 01:08:00 2012 UTC (12 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Changes since 1.117: +4 -2 lines
Diff to previous 1.117 (colored)

Don't export sysmon_envsys_list as a common.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Aug 1 12:28:53 2011 UTC (12 years, 8 months ago) by mbalmer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

According to the Oxford Dictionary of Etymology, a wether is a male sheep
or ram.

Revision 1.112.6.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:09 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.112: +103 -219 lines
Diff to previous 1.112 (colored) next main 1.113 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.116 / (download) - annotate - [select for diffs], Sun Jun 19 11:40:26 2011 UTC (12 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.115: +7 -2 lines
Diff to previous 1.115 (colored)

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

Revision 1.115 / (download) - annotate - [select for diffs], Wed Jun 15 13:34:13 2011 UTC (12 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.114: +11 -9 lines
Diff to previous 1.114 (colored)

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

Revision 1.97.2.3 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:26 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.97.2.2: +95 -218 lines
Diff to previous 1.97.2.2 (colored) next main 1.98 (colored)

sync with head

Revision 1.114 / (download) - annotate - [select for diffs], Wed Jun 8 18:22:24 2011 UTC (12 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.113: +94 -200 lines
Diff to previous 1.113 (colored)

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.

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:08:39 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.112: +5 -22 lines
Diff to previous 1.112 (colored) next main 1.113 (colored)

Sync with HEAD.

Revision 1.113 / (download) - annotate - [select for diffs], Sat Jun 4 13:24:33 2011 UTC (12 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.112: +5 -22 lines
Diff to previous 1.112 (colored)

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.

Revision 1.97.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:54:08 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.97.2.1: +78 -81 lines
Diff to previous 1.97.2.1 (colored)

sync with head

Revision 1.112 / (download) - annotate - [select for diffs], Thu Dec 30 03:59:59 2010 UTC (13 years, 3 months ago) by pgoyette
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr, cherry-xenmp
Changes since 1.111: +10 -4 lines
Diff to previous 1.111 (colored)

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

Revision 1.111 / (download) - annotate - [select for diffs], Thu Dec 16 16:08:57 2010 UTC (13 years, 4 months ago) by njoly
Branch: MAIN
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored)

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.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Dec 15 17:17:16 2010 UTC (13 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.109: +44 -81 lines
Diff to previous 1.109 (colored)

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.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Dec 11 15:17:15 2010 UTC (13 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.108: +36 -11 lines
Diff to previous 1.108 (colored)

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

Revision 1.108 / (download) - annotate - [select for diffs], Wed Dec 8 00:09:14 2010 UTC (13 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.107: +6 -4 lines
Diff to previous 1.107 (colored)

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!

Revision 1.83.4.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:12 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.4: +112 -27 lines
Diff to previous 1.83.4.4 (colored) to branchpoint 1.83 (colored) next main 1.84 (colored)

sync with head.

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:43 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.97: +102 -22 lines
Diff to previous 1.97 (colored)

sync with head

Revision 1.94.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:50 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.94: +155 -40 lines
Diff to previous 1.94 (colored) next main 1.95 (colored)

Sync with HEAD.

Revision 1.107 / (download) - annotate - [select for diffs], Sun Apr 11 01:12:28 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.106: +4 -5 lines
Diff to previous 1.106 (colored)

Use a typedef to define the prototype of the per-sensor callback.

Update manpage for the prototype, and fix a fubar'd Cross-reference.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Apr 10 19:01:00 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.105: +33 -11 lines
Diff to previous 1.105 (colored)

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

Revision 1.105 / (download) - annotate - [select for diffs], Sat Apr 3 13:55:09 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.104: +10 -4 lines
Diff to previous 1.104 (colored)

When unregistering a device, in addition to reducing the global count
of sensors, we need to adjust the sme_fsensor values for some devices.
Failure to do this leaves a sparesly-populated number-space and can
subsequently result in overlapping sensors number assignments.  (This
only affects the compatability-mode API, but still needs to be fixed.)

Revision 1.104 / (download) - annotate - [select for diffs], Thu Apr 1 12:16:14 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.103: +4 -3 lines
Diff to previous 1.103 (colored)

Permit creation of an event-monitor for alarm limits even if the limits
are not currently set (and, in case of battery capacity sensors, if there
is no value_max).  Ensure that such an event-monitor does not trigger the
delivery of any actual events.

Provide a mechanism for sensors to set their limits at time other than
system startup (for example, when a battery is inserted).

This allows us to boot a system with a battery missing, install the
battery some time later, and automatically monitor it without requiring
any user intervention to create the event-monitor.  (The actual changes
for battery sensors to use this new capability will come later.)

Revision 1.103 / (download) - annotate - [select for diffs], Sat Mar 27 13:34:16 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.102: +5 -5 lines
Diff to previous 1.102 (colored)

Constify the args to sysmon_envsys_foreach_sensor()'s callback function.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Mar 27 13:23:18 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.101: +12 -5 lines
Diff to previous 1.101 (colored)

Fix the locking protocol in sysmon_envsys_foreach_sensor(), and add an
additional argument to control whether or not the sensors are refreshed
before invoking the callback routine.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Mar 26 21:06:25 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

Make this work the way the preceeding comment blocks says it works, and
break out of the while{ } when the callback returns false, not when it
returns true!

Revision 1.100 / (download) - annotate - [select for diffs], Fri Mar 26 20:31:06 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.99: +29 -2 lines
Diff to previous 1.99 (colored)

Add a routine to iterate over all the sensors on the system.  This will
be needed to update acpiapm_get_powstat() which is currently slightly
broken due to recent rearrangement of acpi_bat(4)'s sensors.  (This
approach is in lieu of exporting proplists between kernel entities, and
avoids exposing some internal sysmon_envsys details.)

Revision 1.99 / (download) - annotate - [select for diffs], Fri Mar 26 12:36:59 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.98: +18 -5 lines
Diff to previous 1.98 (colored)

Export the sensor device's class.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Mar 24 12:15:54 2010 UTC (14 years ago) by pgoyette
Branch: MAIN
Changes since 1.97: +12 -7 lines
Diff to previous 1.97 (colored)

Do the initial refresh before creating the event monitors, in case the
event monitors require some of the data loaded by the refresh.  For
example, the initial refresh might load sensor limits and max_value in
addition to the cur_value.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Mar 14 18:03:15 2010 UTC (14 years, 1 month ago) by pgoyette
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.96: +12 -7 lines
Diff to previous 1.96 (colored)

Retire the 'monitor' member of the envsys_data_t.  It was only used in
one place, and functioned as a logical OR of the ENVSYS_FMON* flag bits.

Revision 1.83.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:04 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.3: +118 -56 lines
Diff to previous 1.83.4.3 (colored) to branchpoint 1.83 (colored)

sync with head

Revision 1.96 / (download) - annotate - [select for diffs], Mon Feb 15 22:32:04 2010 UTC (14 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Changes since 1.95: +34 -2 lines
Diff to previous 1.95 (colored)

For symmetry, allow warning and critical upper-limits for capacity
sensors.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Feb 14 23:06:01 2010 UTC (14 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.94: +14 -16 lines
Diff to previous 1.94 (colored)

Remove the flags member of the limits structure.  Its value was only
meaningful for a few limited function calls;  all persitent storage
of limit-present flags is maintained in the edata->upropset member.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Feb 5 17:44:27 2010 UTC (14 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.93: +4 -3 lines
Diff to previous 1.93 (colored)

One more callback of sme_refresh() routine needs to check first that
there is a routine to be called!

Revision 1.93 / (download) - annotate - [select for diffs], Sun Jan 31 22:53:56 2010 UTC (14 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

Fix an outdated comment, noticed by Paul Goyette.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Jan 31 21:36:38 2010 UTC (14 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.91: +69 -2 lines
Diff to previous 1.91 (colored)

Add a convenience function to find the maximum value currently reported
by a set (selected via a passed callback predicate) of sensors.
This provides an easy way to query the current temperature of a thermal
zone, for example, from within the kernel - assuming the caller knows
the topology.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Jan 30 02:46:52 2010 UTC (14 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.90: +6 -42 lines
Diff to previous 1.90 (colored)

Validate limit-based monitoring in one place, so we can apply the
constraints to both driver-requested and user-requested monitoring.

While here, clean up some of the debugging DPRINTFs.

Revision 1.85.8.1 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:20 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.85: +70 -148 lines
Diff to previous 1.85 (colored) next main 1.86 (colored)

Sync with HEAD.

Revision 1.83.4.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:11 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.2: +4 -74 lines
Diff to previous 1.83.4.2 (colored) to branchpoint 1.83 (colored)

sync with head.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jul 10 13:09:09 2009 UTC (14 years, 9 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase
Changes since 1.89: +2 -72 lines
Diff to previous 1.89 (colored)

Remove some code (bracketed by #ifdef NOTYET / #endif) that should not
have been committed in the first place.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Jul 8 17:54:27 2009 UTC (14 years, 9 months ago) by pgoyette
Branch: MAIN
Changes since 1.88: +4 -4 lines
Diff to previous 1.88 (colored)

Remove driver name from debug message.  Not all drivers have set this
early enough, and we can easily figure out the driver name from some
subsequent debug messages.

Revision 1.83.4.2 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:29 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83.4.1: +140 -148 lines
Diff to previous 1.83.4.1 (colored) to branchpoint 1.83 (colored)

sync with head

Revision 1.88 / (download) - annotate - [select for diffs], Sat Jun 13 16:08:25 2009 UTC (14 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5
Changes since 1.87: +90 -23 lines
Diff to previous 1.87 (colored)

Add capability to send sensor limit values to the driver so they can
be programmed into device registers.  This way we can let the hardware
help us out instead of having to always compare the value against each
limit.  (Driver updates for some sensors to take advantage of this
capability will be forthcoming.)

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jun 8 00:55:35 2009 UTC (14 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.86: +63 -141 lines
Diff to previous 1.86 (colored)

General clean-up and some restructuring of event handling.  This is a
precursor to letting sensor drivers actually exchange limits/thresholds
with user-land.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Jun 3 11:43:15 2009 UTC (14 years, 10 months ago) by pgoyette
Branch: MAIN
Changes since 1.85: +9 -6 lines
Diff to previous 1.85 (colored)

Don't allocate the private list-threading structure unless we're going
to use it.  Otherwise we end up leaking little bits of memory for each
sensor that is not monitored at time of initial registration.

Revision 1.83.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:13:19 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.83: +128 -9 lines
Diff to previous 1.83 (colored)

sync with head.

Revision 1.84.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:04 2008 UTC (15 years, 6 months ago) by haad
Branch: haad-dm
Changes since 1.84: +126 -8 lines
Diff to previous 1.84 (colored) next main 1.85 (colored)

Sync with HEAD.

Revision 1.80.6.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:31 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.80.6.2: +124 -6 lines
Diff to previous 1.80.6.2 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored)

Sync with HEAD.

Revision 1.83.6.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:35:10 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.83.6.1: +126 -8 lines
Diff to previous 1.83.6.1 (colored) to branchpoint 1.83 (colored) next main 1.84 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.85 / (download) - annotate - [select for diffs], Fri Aug 22 11:27:50 2008 UTC (15 years, 7 months ago) by pgoyette
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, nick-hppapmap, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jym-xensuspend-base, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.84: +126 -8 lines
Diff to previous 1.84 (colored)

1. provide for warning-min and warning-max alarm levels in addition to
   critical-min and critical-max; also, a battery warning-capacity is
   added in addition to a critical-capacity.

2. usr.sbin/envstat is modified to introduce a -W command line switch to
   display the warning-* values instead of the critical-* values, and
   envstat(8) and envsys.conf(5) man pages are updated appropriately.

3. Treat user-defined limits as a single continuum and generate a single
   event regardless of how many boundaries a change in sensor value
   crosses;  ditto for driver-defined limits.

Fixes my PR/39021
Fixes my PR/39022

OK'd by christos@ bouyer@ cube@

Revision 1.83.6.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:30 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.80.6.2 / (download) - annotate - [select for diffs], Thu Jun 5 19:14:35 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.80.6.1: +2 -1 lines
Diff to previous 1.80.6.1 (colored) to branchpoint 1.80 (colored)

Sync with HEAD.

Also fix build.

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:19 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored) next main 1.84 (colored)

sync with head

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jun 3 15:00:57 2008 UTC (15 years, 10 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored)

Add SME_POLL_ONLY flag, which informs sme to only refresh the sensor when
it is polled (and not from GTREDATA).

Revision 1.80.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:56 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.80: +232 -200 lines
Diff to previous 1.80 (colored)

Sync with HEAD.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Apr 2 11:19:22 2008 UTC (16 years ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-pf42, yamt-nfs-mp, wrstuden-revivesa
Changes since 1.82: +3 -11 lines
Diff to previous 1.82 (colored)

Initialize and destroy the callout in sme_events_init() and
sme_events_destroy() respectively. And don't stop twice the callout
when calling sysmon_envsys_unregister().

Revision 1.82 / (download) - annotate - [select for diffs], Tue Apr 1 12:25:30 2008 UTC (16 years ago) by xtraeme
Branch: MAIN
Changes since 1.81: +213 -195 lines
Diff to previous 1.81 (colored)

Introduce per-device locking/synchronization and maintain only a
global mutex for the linked list of devices and the global proplib
dictionary.

This has improved locking contention a lot when multiple devices with
multiple monitoring events are running:

New:

 0.30      35      0.33 sme_global_mtx         sysmonioctl_envsys+28b
 0.10      10      0.11 00000000cd97feac       sysmon_envsys_acquire+4c
 0.08       6      0.09 00000000cd97feac       sme_update_dictionary+24f
 0.01       4      0.01 00000000cd97feac       sme_events_worker+2f
 0.01      10      0.01 00000000cd97fe2c       sysmon_envsys_acquire+4c
 0.00       1      0.00 00000000cd97fe2c       sysmon_envsys_release+3b
28.38      94      9.16 sme_global_mtx         sysmonioctl_envsys+28b
 4.54      74      1.47 00000000cd97fe2c       sysmon_envsys_acquire+4c
 0.06       3      0.02 00000000cd97fe2c       sysmon_envsys_release+3b
 0.03       1      0.01 00000000cd97fe2c       sme_events_worker+2f
 1.40      19      0.45 00000000cd97bee4       sysmon_envsys_acquire+4c

Old:

 4.25     313      4.74 sme_mtx                <all>
 3.12     185      3.49 sme_mtx                sme_events_worker+21
 1.12     128      1.25 sme_mtx                sysmonioctl_envsys+29b
34.75    1423     59.52 sme_mtx                <all>
22.08     477     37.82 sme_mtx                sysmonioctl_envsys+29b
12.67     946     21.70 sme_mtx                sme_events_worker+21

Revision 1.8.16.9 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:00 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.8: +30 -8 lines
Diff to previous 1.8.16.8 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)

sync with head.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Mar 23 16:09:41 2008 UTC (16 years ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Changes since 1.80: +30 -8 lines
Diff to previous 1.80 (colored)

Fix some problems reported by <drochner> a while ago on tech-kern:

sme_events_worker: skip sensors with invalid state.
sme_acadapter_check:

	* use a boolean to check if an SME_CLASS_ACADAPTER was found.
	* Always refresh sensor data before checking value_cur.

Introduce the SME_INIT_REFRESH flag. If a device sets this it will mean
that after interrupts are enabled in the autoconf(9) process, sensor
data will be refreshed once.

Revision 1.46.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:52 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.46.2.2: +5 -5 lines
Diff to previous 1.46.2.2 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored)

sync with HEAD

Revision 1.71.2.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:25 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.71.2.2: +21 -18 lines
Diff to previous 1.71.2.2 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

Sync with HEAD.

Revision 1.8.16.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:23:35 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.7: +5 -5 lines
Diff to previous 1.8.16.7 (colored) to branchpoint 1.8 (colored)

sync with head.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Feb 2 02:02:37 2008 UTC (16 years, 2 months ago) by xtraeme
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: mjf-devfs2
Changes since 1.79: +5 -5 lines
Diff to previous 1.79 (colored)

Destroy the callout via sysmon_envsys_destroy() now that it's
initialized in sysmon_envsys_create().

Revision 1.8.16.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:44:38 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.6: +18 -15 lines
Diff to previous 1.8.16.6 (colored) to branchpoint 1.8 (colored)

sync with head

Revision 1.46.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:54:33 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.46.2.1: +602 -323 lines
Diff to previous 1.46.2.1 (colored) to branchpoint 1.46 (colored)

sync with HEAD

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:14 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.75: +18 -15 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync with HEAD

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jan 2 12:20:26 2008 UTC (16 years, 3 months ago) by xtraeme
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.78: +10 -10 lines
Diff to previous 1.78 (colored)

- Initialize the callout with CALLOUT_MPSAFE, like it was done before
  in sysmon_envsys_events.c.
- Separate sme_event_check_low_power() into sme_battery_check(),
  sme_acadapter_check() and sme_battery_critical() (no functional changes).

Revision 1.78 / (download) - annotate - [select for diffs], Wed Jan 2 10:15:53 2008 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.77: +8 -2 lines
Diff to previous 1.77 (colored)

In sysmon_envsys_create(), initialize the callout structure.  Stops
panics with a DIAGNOSTIC kernel.

In sysmon_envsys_find_40(), wait until an envsys is not busy before
settings its busy flag, in the pattern of sysmon_envsys_find().

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jan 2 03:06:02 2008 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.76: +4 -6 lines
Diff to previous 1.76 (colored)

Use LIST_FOREACH().

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jan 2 02:29:14 2008 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.75: +3 -4 lines
Diff to previous 1.75 (colored)

Use TAILQ_FOREACH().

Revision 1.45.4.7 / (download) - annotate - [select for diffs], Sun Dec 9 19:37:59 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.45.4.6: +4 -4 lines
Diff to previous 1.45.4.6 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

Sync with HEAD.

Revision 1.71.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:19:58 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.71.2.1: +7 -14 lines
Diff to previous 1.71.2.1 (colored) to branchpoint 1.71 (colored)

Sync with HEAD.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:31 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored) next main 1.75 (colored)

Sync with head.

Revision 1.8.16.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:31:24 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.5: +588 -312 lines
Diff to previous 1.8.16.5 (colored) to branchpoint 1.8 (colored)

sync with head

Revision 1.75 / (download) - annotate - [select for diffs], Wed Dec 5 06:52:27 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

MUTEX_SPIN -> MUTEX_DEFAULT.

Revision 1.45.4.6 / (download) - annotate - [select for diffs], Wed Nov 21 21:55:48 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.45.4.5: +588 -312 lines
Diff to previous 1.45.4.5 (colored) to branchpoint 1.45 (colored)

Sync with HEAD.

Revision 1.69.2.3 / (download) - annotate - [select for diffs], Wed Nov 21 21:19:41 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.69.2.2: +7 -14 lines
Diff to previous 1.69.2.2 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Tue Nov 20 17:27:35 2007 UTC (16 years, 4 months ago) by xtraeme
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.73: +3 -6 lines
Diff to previous 1.73 (colored)

Update a comment.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Nov 20 17:24:32 2007 UTC (16 years, 4 months ago) by xtraeme
Branch: MAIN
Changes since 1.72: +6 -10 lines
Diff to previous 1.72 (colored)

After comments from Andrew Doran:

- The mutex for the callout handler must run at IPL_SOFTCLOCK.
- Just stop the callout in sysmon_envsys_unregister() and don't wait
  for the callout to finish.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:23 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.71: +596 -313 lines
Diff to previous 1.71 (colored)

Sync with HEAD.

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Sun Nov 18 19:35:41 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.69.2.1: +592 -309 lines
Diff to previous 1.69.2.1 (colored) to branchpoint 1.69 (colored)

Sync with HEAD

Revision 1.72 / (download) - annotate - [select for diffs], Fri Nov 16 08:00:16 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
Changes since 1.71: +596 -313 lines
Diff to previous 1.71 (colored)

Extend the envsys2 API (one more time, sorry) as defined in:

http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.

Revision 1.8.16.5 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:31 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.4: +35 -18 lines
Diff to previous 1.8.16.4 (colored) to branchpoint 1.8 (colored)

sync with head.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:01:38 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.69: +35 -18 lines
Diff to previous 1.69 (colored)

Sync with HEAD

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:30:19 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.46: +685 -452 lines
Diff to previous 1.46 (colored)

sync with HEAD

Revision 1.45.4.5 / (download) - annotate - [select for diffs], Sun Nov 4 21:03:29 2007 UTC (16 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.45.4.4: +35 -18 lines
Diff to previous 1.45.4.4 (colored) to branchpoint 1.45 (colored)

Sync with HEAD.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 3 23:05:21 2007 UTC (16 years, 5 months ago) by xtraeme
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.70: +24 -16 lines
Diff to previous 1.70 (colored)

- Rename ENVSYS_BATTERY_STATE units to ENVSYS_BATTERY_CAPACITY and
  introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
  it's used to know if the battery is currently charging or discharging.

- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
  condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.

- Simplify sme_event_check_lowpower() and make it check the required
  sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
  If the acadapter is not ready, trust the state returned by the battery
  device.

Based on suggestion from joerg@.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Nov 2 19:21:29 2007 UTC (16 years, 5 months ago) by plunky
Branch: MAIN
Changes since 1.69: +13 -4 lines
Diff to previous 1.69 (colored)

do not embed acpi device names in the sensor names
fake it in the compat code for the old envsys API

Revision 1.8.16.4 / (download) - annotate - [select for diffs], Sat Oct 27 11:34:20 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.3: +534 -362 lines
Diff to previous 1.8.16.3 (colored) to branchpoint 1.8 (colored)

sync with head.

Revision 1.67.2.2 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:19 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.67.2.1: +325 -147 lines
Diff to previous 1.67.2.1 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored)

sync with head.

Revision 1.17.2.4 / (download) - annotate - [select for diffs], Tue Oct 9 13:42:05 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.17.2.3: +663 -447 lines
Diff to previous 1.17.2.3 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored)

Sync with head.

Revision 1.45.4.4 / (download) - annotate - [select for diffs], Sun Oct 7 13:25:05 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.45.4.3: +325 -147 lines
Diff to previous 1.45.4.3 (colored) to branchpoint 1.45 (colored)

Sync with HEAD.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Oct 7 04:11:15 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.68: +325 -147 lines
Diff to previous 1.68 (colored)

New changes to support the new configuration file format for
envstat(8) and the envsys framework:

- Modify the ENVSYS_SETDICTIONARY ioctl to support the following
  plist structure:

  <dict>
	<key>foo0</key>
	<array>
		<dict>
			<key>index</key>
			<string>sensor0</string>
			<key>description</key>
			<string>cpu temp</string>
			...
			Another property for this sensor
			...
		</dict>
		...
		Another dictionary for other sensor
		...
	</array>
	...
	Another device as above
	...
  </dict>

  Multiple devices with multiple sensors can now be specified, that means
  that to set the properties only one copyin(9) is needed now.

- Added the ENVSYS_REMOVEPROPS ioctl, that accepts a boolean object
  "envsys-remove-props" and when set to true, all properties that were
  set previously by ENVSYS_SETDICTIONARY will be removed. That means that
  you can now set multiple critical limits, descriptions and all they
  will be removed or changed to its default value (for rfact and
  description objects).

- Added the 'index' and 'allow-rfact' objects into the sensor dictionaries,
  for better interactivity with userland. To know the position of the
  sensor and to know if sensor allows to change the rfact.

- Misc cosmetic changes for consistency.

- Use a two clause license for all my code.

Revision 1.67.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:31:32 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.67: +3 -2 lines
Diff to previous 1.67 (colored)

sync with head.

Revision 1.45.4.3 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:40 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.45.4.2: +217 -223 lines
Diff to previous 1.45.4.2 (colored) to branchpoint 1.45 (colored)

Sync with HEAD.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Sep 24 19:46:38 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Changes since 1.67: +3 -2 lines
Diff to previous 1.67 (colored)

sme_add_sensor_dictionary: don't forget to release the dictionary when
an error ocurrs. This is the last memleak in the code, let me know if
you find more and I'll pay you a beer.

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Mon Sep 10 10:55:22 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.24.2.2: +216 -223 lines
Diff to previous 1.24.2.2 (colored) to branchpoint 1.24 (colored) next main 1.25 (colored)

Sync with HEAD.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Sep 9 12:28:08 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.66: +6 -6 lines
Diff to previous 1.66 (colored)

Change the DPRINTFs in sysmon_envsys_destroy_plist() to DPRINTFOBJs
(second level of verbosity).

Revision 1.66 / (download) - annotate - [select for diffs], Sat Sep 8 23:59:38 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.65: +3 -2 lines
Diff to previous 1.65 (colored)

sysmon_envsys_register: don't forget to clear SME_FLAG_BUSY when
registration succeeds.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Sep 8 23:21:02 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.64: +4 -4 lines
Diff to previous 1.64 (colored)

Use DPRINTF for a debugging printf.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Sep 8 23:14:13 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.63: +3 -4 lines
Diff to previous 1.63 (colored)

Remove an unused variable.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Sep 8 22:42:37 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.62: +25 -11 lines
Diff to previous 1.62 (colored)

Fix another memleak that only happened when using
sysmon_envsys_unregister(): in sysmon_envsys_destroy_plist() I wasn't
removing the _objects_ from the dictionary, instead I was calling
prop_object_release() with the keysym returned by
prop_object_iterator_next()... obviously this wasn't correct.

Revision 1.62 / (download) - annotate - [select for diffs], Sat Sep 8 15:47:37 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.61: +8 -5 lines
Diff to previous 1.61 (colored)

Don't forget to free sme_evdrv in non error case too. Noticed and
reviewed by rmind.

Revision 1.61 / (download) - annotate - [select for diffs], Sat Sep 8 15:25:18 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.60: +24 -10 lines
Diff to previous 1.60 (colored)

Use only one single condvar(9) for devices and events, they are protected
by the same mutex (sme_mtx) and there's no point in using two of them.

Also add a comment mentioning some locking notes.

Reviewed and ok by rmind.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Sep 8 03:41:28 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

Disable debug, committed accidentally in previous.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Sep 8 03:37:51 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.58: +8 -3 lines
Diff to previous 1.58 (colored)

sysmon_envsys_register: only call sme_event_unregister_all when any
other error than EEXIST is returned.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 8 03:17:38 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.57: +85 -71 lines
Diff to previous 1.57 (colored)

- Use only one global mutex for all tasks with devices & events.
- sysmon_envsys_register: use a SLIST to maintain allocated sme_event_drv_t
  structs for later use in sysmon_task_queue_sched(). This avoids a
  locking error acquiring/dropping the mutex multiple times.

Suggested by rmind.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Sep 8 00:58:32 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.56: +2 -4 lines
Diff to previous 1.56 (colored)

Remove another COMPAT_40 block, found by rmind@.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Sep 8 00:21:43 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.55: +43 -48 lines
Diff to previous 1.55 (colored)

- Build unconditionally compatibility code, there's no point to have it
  disabled, because some drivers depend in the old code yet.
- Use a new mutex for sysmon_envsys_next_sensor_index (used in
  compatibility code), otherwise bad things happen with LKMs. Thanks
  to this, the hack for LKMs has been removed.
- Check in advance if the driver doesn't exist already on the list
  before adding the sensors in the dictionary.
- Don't forget to call sme_event_unregister_all() if
  sysmon_envsys_unregister() fails after adding the array into the global
  dictionary or when creating sensors.
- Modify and add some DPRINTFs.

The lm(4) lkm works without known problems registering and unregistering
it multiple times.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Sep 4 16:54:02 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.54: +77 -127 lines
Diff to previous 1.54 (colored)

- Remove ENVSYS_GSTRING and the genstr member from envsys_data_t.
  (at least three or four persons were against it).
- Add a new sensor type: ENVSYS_BATTERY_STATE, this uses value_cur
  and some predefined values in a static table, like ENVSYS_DRIVE.
- Move all static tables to sysmon_envsys_tables.c and use a function
  on it to retrieve a pointer to the struct of the specified type.
- Rename the ENVSYS_FMONDRVSTCHANGED to ENVSYS_FMONSTCHANGED and make
  it generic for Battery state and drive sensors (this flag enables
  monitoring on these sensors when state has been changed).
- Update sysmon_penvsys_event() to report state changes on
  ENVSYS_BATTERY_STATE sensors and remove other type of events, with
  PENVSYS_EVENT_STATE_CHANGED they are not necessary anymore.

Revision 1.45.4.2 / (download) - annotate - [select for diffs], Mon Sep 3 16:48:39 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.45.4.1: +290 -246 lines
Diff to previous 1.45.4.1 (colored) to branchpoint 1.45 (colored)

Sync with HEAD.

Revision 1.8.16.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:38:49 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.2: +1195 -151 lines
Diff to previous 1.8.16.2 (colored) to branchpoint 1.8 (colored)

sync with head.

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:22:00 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.24.2.1: +290 -246 lines
Diff to previous 1.24.2.1 (colored) to branchpoint 1.24 (colored)

Sync with HEAD.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Sep 2 19:36:59 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.53: +61 -18 lines
Diff to previous 1.53 (colored)

Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING.

ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.

It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:

<dict>
	<key>description</key>
	<string>acpibat0 charge state</string>
	<key>generic-state-string</key>
	<string>NORMAL</string>
	<key>monitoring-supported</key>
	<false/>
	<key>state</key>
	<string>valid</string>
	<key>type</key>
	<string>Generic string</string>
</dict>

Note that it's limited to 32 chars, but we can grow it if needed.

envstat(8) will print ENVSYS_GSTRING sensors as:

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$

Revision 1.53 / (download) - annotate - [select for diffs], Sat Sep 1 13:43:10 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.52: +71 -65 lines
Diff to previous 1.52 (colored)

- Fix a memleak in ENVSYS_SETDICTIONARY if there wasn't any error
  (thanks god for KMEMSTATS).
- sysmon_envsys_register: add all objects in the dictionary without any
  lock, at this point the sme device hasn't been added into the list
  and it's safe.
- Add sysmon_envsys_destroy_plist(prop_array_t) that destroys all objects
  associated with a device and use it on sysmon_envsys_unregister() and
  sysmon_envsys_register() if there's any error.

Thanks to Mindaugas Rasiukevicius (rmind@) for the great comments/ideas.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Aug 31 22:44:39 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.51: +15 -18 lines
Diff to previous 1.51 (colored)

- sme_unregister_all: there's no need to use a struct sysmon_envsys as
  argument, just pass sme->sme_name to it.
- sysmon_envsys_register: drop the array in all cases, not just when
  there's an error. The reference is stored in the dictionary anyway...
- Update some comments.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Aug 31 10:13:27 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)

Merge sme_event_add() into sme_event_register()... there's no need
to have two different functions for this.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Aug 31 00:35:08 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.49: +7 -2 lines
Diff to previous 1.49 (colored)

Add a few KASSERT(mutex_owned(&foo_lock)) as suggested by Andrew Doran.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Aug 30 23:44:32 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.48: +44 -58 lines
Diff to previous 1.48 (colored)

More misc changes for sysmon_envsys(9):

- Add the SLIST for sensor descriptions and sme_uniqsensors into the
  struct sysmon_envsys (it's per device now).
- Use only one common struct with three members for the static tables
  (there's no need to have different structs just for them).
- While initializing/destroying the events framework, use the
  strategy specified by Andrew Doran in:
  http://mail-index.netbsd.org/tech-kern/2007/06/21/0025.html).

Revision 1.48 / (download) - annotate - [select for diffs], Thu Aug 30 21:31:28 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.47: +18 -23 lines
Diff to previous 1.47 (colored)

Simplify sysmon_envsys_register() and fix an obvious error in
previous.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Aug 30 18:01:26 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
Changes since 1.46: +175 -163 lines
Diff to previous 1.46 (colored)

Some changes to improve locking on sysmon_envsys(9):

- Remove sme_mtx, a global lock (sme_list_mtx) is used to access to
  the sysmon envsys device.
- Allocate memory with KM_NOSLEEP rather than KM_SLEEP if there's a
  mutex held, to avoid sleeping.
- Remove sysmon_envsys_createplist() and add the logic into
  sysmon_envsys_register().
- sysmon_envsys_register: allocate the array and dictionaries required
  in advance for a device before the locking and adding the objects
  into the array happens.
- Rename sme_make_dictionary() to sme_add_sensor_dictionary() and pass
  to it the dictionary on which the objects will be stored for a sensor.
- Improve locking here and there.

Thanks to Mindaugas Rasiukevicius and Andrew Doran for comments.

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Mon Aug 20 18:37:49 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.17.2.2: +358 -135 lines
Diff to previous 1.17.2.2 (colored) to branchpoint 1.17 (colored)

Sync with HEAD.

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:45 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.24: +327 -154 lines
Diff to previous 1.24 (colored)

Sync with HEAD.

Revision 1.45.4.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:14 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.45: +2 -3 lines
Diff to previous 1.45 (colored)

Sync with HEAD.

Revision 1.46.4.2 / (download) - annotate - [select for diffs], Sun Aug 5 23:16:26 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: matt-mips64
Changes since 1.46.4.1: +1333 -0 lines
Diff to previous 1.46.4.1 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored)

In ENVSYS_SETDICTIONARY if sysmon_envsys_find() returns NULL, do not
call sysmon_envsys_release with a NULL argument.

Revision 1.46.4.1, Sun Aug 5 23:16:25 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: matt-mips64
Changes since 1.46: +0 -1333 lines
FILE REMOVED

file sysmon_envsys.c was added on branch matt-mips64 on 2007-08-05 23:16:26 +0000

Revision 1.46 / (download) - annotate - [select for diffs], Sun Aug 5 23:16:25 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64, matt-armv6
Changes since 1.45: +2 -3 lines
Diff to previous 1.45 (colored)

In ENVSYS_SETDICTIONARY if sysmon_envsys_find() returns NULL, do not
call sysmon_envsys_release with a NULL argument.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jul 29 14:02:29 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: MAIN
CVS Tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Changes since 1.44: +14 -19 lines
Diff to previous 1.44 (colored)

- Do not call sme_gtredata in sysmon_envsys_createplist, as in some
  systems the interrupts are not configured and causes unexpected behaviour
  in acpi_bat and other drivers, reported by cube@.
- Update the 'type' object in sme_update_dictionary(), so that it can
  report the correct units type in acpibat(4).

Revision 1.44 / (download) - annotate - [select for diffs], Fri Jul 27 11:59:09 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: MAIN
Changes since 1.43: +7 -6 lines
Diff to previous 1.43 (colored)

Change locking stuff in sysmon_envsys_register() and
sysmon_envsys_createplist().

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 23 17:51:16 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: MAIN
Changes since 1.42: +5 -4 lines
Diff to previous 1.42 (colored)

- ENVSYS_SETDICTIONARY: use sysmon_envsys_release() if there's an error.
- sme_events_worker: use sme_list_mtx when accessing to the sysmon_envsys
  linked list.
- Improve the comments in sysmon_envsysvar.h about the mutexes and condvar.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jul 23 08:45:51 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: MAIN
Changes since 1.41: +9 -7 lines
Diff to previous 1.41 (colored)

- sysmon_envsys_createplist: do not return the error of sme->sme_gtredata
  in all cases to the caller, just continue and show a debug printf if it
  fails, because it's not a critical error.

- Improve some debugging printfs.

Fixes another part of yamt@'s PR kern/36673, that I forgot to commit
yesterday.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jul 22 18:17:03 2007 UTC (16 years, 8 months ago) by xtraeme
Branch: MAIN
Changes since 1.40: +140 -135 lines
Diff to previous 1.40 (colored)

Fix the last point reported by yamt in PR kern/36673:

- There must be three mandatory objects in a sensor to be valid and be
  enabled on its dictionary: units, state and desc. If any of these
  objects fails for some reason, its dictionary won't created in the
  array and sensor will be marked with ENVSYS_FNOTVALID in edata->flags.

  That means there won't never be a partial dictionary.

- Mark all invalid sensors and sensors with duplicate description with
  ENVSYS_FNOTVALID and remove ENVSYS_FDUPDESC. The former is the generic
  way to say that a sensor does not obey the rules and must be not
  created.

- sysmon_envsys_createplist: if the array does not contain any object,
  release the array and return the error.

And with all that stuff I can go to holidays and be happy.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 21 22:11:02 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.39: +35 -13 lines
Diff to previous 1.39 (colored)

- Do not touch sme_nsensors when sensors with duplicate description are
  found, rather maintain a global counter for all sensors that are unique,
  and use this global to get the correct index in the array.
- Use prop_array_set() rather than prop_array_add() for adding dictionaries
  into our global array. Thanks to yamt@.
- Overwrite the sensor index in the first sensor of a device, to avoid
  a problem with LKMs where the first sensor gets the index of all edata
  structures allocated in kernel.
- Add missing proto for sme_register_sensorname().

All them fix another part of yamt@'s PR.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 21 17:18:00 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.38: +7 -4 lines
Diff to previous 1.38 (colored)

Use the mutex that belongs to the specific task and do not mix them
blindly.

	- sme_list_mtx to access to the linked lists sme_list/sme_names_list.
	- sme_mtx to access to the data in the sysmon envsys device.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jul 21 16:16:59 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.37: +2 -3 lines
Diff to previous 1.37 (colored)

sme_update_dictionary: if there's a sensor with duplicate description,
there's no need to decrease 'i' again, just sme->sme_nsensors is enough.

Reported by yamt@.

Revision 1.37 / (download) - annotate - [select for diffs], Sat Jul 21 15:45:12 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.36: +4 -11 lines
Diff to previous 1.36 (colored)

Simplify previous.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jul 21 15:30:04 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.35: +10 -2 lines
Diff to previous 1.35 (colored)

Skip sensor with duplicate descriptions in the COMPAT_40 case, verified
with envstat(8) from netbsd-4 and sys/lkm/misc/envsys2.

Fixes another part of kern/36673 by yamt@.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jul 21 15:16:58 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.34: +62 -43 lines
Diff to previous 1.34 (colored)

- Add sme_events_destroy() to stop/destroy the callout and workqueue if
  there are no more events.
- Add sme_event_unregister_all() to remove all events associated with
  a device and use it in sysmon_envsys_unregister() to fix a "use-after-free".
- Check return error of sme_sensor_upfoo() in sme_make_dictionary() and
  return it rather than 0 all the time.
- Add more KASSERTS.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jul 21 12:11:27 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.33: +41 -55 lines
Diff to previous 1.33 (colored)

Some fixes for kern/36673 by yamt@:

- sme_register_sensorname: there's no need to handle empty list case.
- 'obj' argument in sme_sensor_upstring and similar functions is useless:
  removed the obj argument from the functions, it's handled in the function
  itself now.
- check for more errors in sme_make_dictionary() and
  sysmon_envsys_createplist().

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jul 21 00:05:54 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.32: +7 -2 lines
Diff to previous 1.32 (colored)

Re-add a strlcpy() to copy the new description in edata->desc, if the
object in dictionary was updated succesfully.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jul 20 14:59:58 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.31: +4 -2 lines
Diff to previous 1.31 (colored)

Add another missing break if updating the drive-state object fails.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jul 20 10:47:25 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.30: +5 -2 lines
Diff to previous 1.30 (colored)

Add a missing break if error when setting a new description.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jul 20 10:40:07 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.29: +122 -48 lines
Diff to previous 1.29 (colored)

Replace the macros to create/update objects in dictionary with three
inline functions, suggested by yamt@.

This also gets rid of a few gotos.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jul 19 17:06:25 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

sysmon_envsys_unregister: do not kmem_free(9) with the mutex held.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jul 19 09:29:48 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.27: +3 -2 lines
Diff to previous 1.27 (colored)

sme_register_sensorname: don't forget to kmem_free(9) before returning
EEXIST.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jul 19 00:12:47 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.26: +81 -31 lines
Diff to previous 1.26 (colored)

Maintain a SLIST per device to check for unique descriptions and do not
create any dictionary if it's duplicated. Only the first sensor that has
a unique description will be added.

Remove all elements from the list at sysmon_envsys_unregister() time and
free resources associated with it.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jul 18 20:31:41 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored)

- More changes related to locking.
- Add a condvar(9) to protect deletions on the list if there's an event
  in the worker thread.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jul 18 20:23:10 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored)

sme_make_dictionary: if prop_array_add() fails, don't forget to release
the dictionary. Pointed out by yamt@.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jul 17 17:56:04 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
CVS Tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Changes since 1.23: +18 -9 lines
Diff to previous 1.23 (colored)

Add more debugging printfs to catch sensors with duplicate description,
and some cosmetic ones.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Jul 17 16:47:58 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.22: +47 -7 lines
Diff to previous 1.22 (colored)

Skip sensors with the same description on the same device at attach time,
if the description of it is not unique, mark the sensor with
ENVSYS_FDUPDESC, return EEXIST and continue.

Also, when changing a description, check that the new description is not
assigned by any other sensor, otherwise return EEXIST.

Note that these restrictions are only per device. Fixes PR kern/36660.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jul 17 15:43:08 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.21: +6 -2 lines
Diff to previous 1.21 (colored)

Only allow to use ENVSYS_SETDICTIONARY if the user has write permission
in the /dev/sysmon device.

Use O_RDONLY for ENVSYS_GETDICTIONARY and O_RDWR for ENVSYS_SETDICTIONARY
in envstat(8).

Fixes PR kern/36661 by YAMAMOTO Takashi.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 16 17:48:52 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.20: +5 -8 lines
Diff to previous 1.20 (colored)

There's no reason why integer sensors were disabled for monitoring,
so enable it. This will allow to set a min/max limit for the
macppc/battery.c driver, which uses an integer sensor to report the
battery capacity.

Indicator/Integer sensors will share the /etc/power/scripts/sensor_indicator
script to report the events.

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:49 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.17.2.1: +892 -151 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored)

Sync with head.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Sun Jul 15 13:21:45 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.17: +38 -2 lines
Diff to previous 1.17 (colored)

Sync with head.

Revision 1.17.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:08:24 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.17: +928 -151 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Sync with head.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jul 4 16:30:18 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.19: +12 -22 lines
Diff to previous 1.19 (colored)

Fix the old ENVSYS_GTREDATA ioctl if there are sensors with invalid
state. Enable all sensors by default as valid and current valid data and
if there is one that is in invalid state, mark current data as not valid.

This matches the behaviour with the old API. Also, this fixes the problem
with ipmi(4) reporting bogus values with sensors in invalid state using
the old envstat(8).

Note that this only happened when using the old envstat(8).

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 2 15:18:30 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)

Add PENVSYS_TYPE_INDICATOR to handle events on Indicator sensors.

ipmi(4) uses this for the Intrussion and Power Supply sensors.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jul 1 07:36:45 2007 UTC (16 years, 9 months ago) by xtraeme
Branch: MAIN
Changes since 1.17: +938 -151 lines
Diff to previous 1.17 (colored)

Imported envsys 2, a brief description of the new features:
(Part 1: API)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
  and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
  sysmon_power(9) and powerd(8), that means there is no 32 bytes event
  size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:57:13 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Sync with HEAD.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:45 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 19 06:08:37 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.15: +30 -31 lines
Diff to previous 1.15 (colored)

Back out previous for now. There isn't currently an easy way to set up
shared state before these get attached or used.

From xtraeme@.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 19 00:36:12 2007 UTC (17 years, 2 months ago) by xtraeme
Branch: MAIN
Changes since 1.14: +6 -12 lines
Diff to previous 1.14 (colored)

Replace SYSMON_ENVSYS_{LOCK,UNLOCK} with mutex_{enter,exit}.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 18 23:38:11 2007 UTC (17 years, 2 months ago) by xtraeme
Branch: MAIN
Changes since 1.13: +29 -22 lines
Diff to previous 1.13 (colored)

* Replace simple_locks and exclusive locks with adaptive mutexes.
* Replace ltsleep/wakeup pairs with condition variables
  (cv_init/cv_wait/cv_broadcast).

Reviewed by ad@.

Revision 1.8.16.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:49:38 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8.16.1: +8 -8 lines
Diff to previous 1.8.16.1 (colored) to branchpoint 1.8 (colored)

sync with head.

Revision 1.11.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:16 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.11.6.1: +8 -8 lines
Diff to previous 1.11.6.1 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync with head.

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:50 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.11: +8 -6 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:26 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Changes since 1.12: +8 -8 lines
Diff to previous 1.12 (colored)

__unused removal on arguments; approved by core.

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:06:51 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.11: +8 -6 lines
Diff to previous 1.11 (colored)

sync with head

Revision 1.12 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:59 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.11: +8 -6 lines
Diff to previous 1.11 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.9.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:55:16 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

sync with head

Revision 1.9.8.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:19 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.9.8.1: +2 -4 lines
Diff to previous 1.9.8.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

sync with head

Revision 1.10.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:43 2006 UTC (17 years, 9 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.10: +2 -4 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Merge from HEAD.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jul 8 20:26:06 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.10: +2 -4 lines
Diff to previous 1.10 (colored)

expose the ioctl internal function now used by the acpi_apm code.

Revision 1.8.16.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:07:30 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.8: +10 -8 lines
Diff to previous 1.8 (colored)

sync with head.

Revision 1.9.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:37 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with head.

Revision 1.9.10.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:26:20 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

sync with head.

Revision 1.9.8.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:28 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored)

sync with head.

Revision 1.9.12.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:16 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 20 03:23:35 2006 UTC (18 years, 1 month ago) by lukem
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, simonb-timecounters-base, gdamore-uart-base, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.9: +6 -4 lines
Diff to previous 1.9 (colored)

Don't attempt to call (*sme->sme_gtredata)() or (*sme->sme_streinfo)()
if those members are NULL.
As discussed on tech-kern in October/November 2005.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Dec 11 12:23:56 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.8: +6 -6 lines
Diff to previous 1.8 (colored)

merge ktrace-lwp.

Revision 1.6.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:33:42 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.6.2.3: +6 -6 lines
Diff to previous 1.6.2.3 (colored) next main 1.7 (colored)

Fix the sync with head I botched.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:51:34 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.6.2.2: +6 -6 lines
Diff to previous 1.6.2.2 (colored)

Sync with HEAD.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:51:29 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.6.2.1: +27 -8 lines
Diff to previous 1.6.2.1 (colored)

Sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 11 15:07:14 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-lazymbuf
Changes since 1.7: +8 -5 lines
Diff to previous 1.7 (colored)

do wakeup() only when someone is waiting for us.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Aug 11 14:24:41 2003 UTC (20 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.6: +24 -8 lines
Diff to previous 1.6 (colored)

introduce SME_FLAG_BUSY and set it during operations
instead of keeping sysmon_envsys_list_slock spinlock held
because some drivers might sleep in sysmon_envsys ops,

XXX sysmon_envsys_lock is now redundant

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:22 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 29 22:30:50 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:45 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.4: +6 -6 lines
Diff to previous 1.4 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.1.4.4 / (download) - annotate - [select for diffs], Fri Jan 3 17:08:12 2003 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.1.4.3: +21 -17 lines
Diff to previous 1.1.4.3 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Dec 31 05:26:56 2002 UTC (21 years, 3 months ago) by explorer
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.3: +21 -17 lines
Diff to previous 1.3 (colored)

add envsys support to acpi A/C adapter and batteries.  This is still a work
in progress, much like the rest of ACPI.

Revision 1.1.4.3 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:26 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.4.2: +2 -2 lines
Diff to previous 1.1.4.2 (colored) to branchpoint 1.1 (colored)

Catch up to -current.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:35 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1.4.1: +22 -31 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored)

More catchup.

Revision 1.1.6.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:58:36 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.1: +24 -30 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

Sync kqueue branch with -current.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jan 3 22:35:53 2002 UTC (22 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, ifpoll-base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base, eeh-devprop
Changes since 1.2: +22 -31 lines
Diff to previous 1.2 (colored)

The device close routine is called when _last_ descriptor to the
device file is closed, rather on every descriptor close. Instead of
getting the exclusive lock on open and releasing on close, get
the lock only when needed in sysmonioctl_envsys().
Fixes kern/14368 by Anthony Mallet. Okayed by Jason Thorpe.

While here, also inline sysmon_envsys_init() to sysmonopen_envsys(),
and g/c sysmonioctl_wdog() prototype.

Revision 1.1.4.1 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:09 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.1: +4 -1 lines
Diff to previous 1.1 (colored)

Catch up to -current.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Nov 13 06:28:55 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.1: +4 -1 lines
Diff to previous 1.1 (colored)

add RCSIDs

Revision 1.1.8.1 / (download) - annotate - [select for diffs], Tue Sep 18 19:13:51 2001 UTC (22 years, 7 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.1: +6 -6 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

Various changes to make cloning devices possible:

	* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
	  not NULL, specfs will create a cloned (aliased) vnode during
	  the call, and return it there. The caller should release and
	  unlock the original vnode if a new vnode was returned. The
	  new vnode is returned locked.

	* Add a flag field to the cdevsw and bdevsw structures.
	  DF_CLONING indicates that it wants a new vnode for each
	  open (XXX is there a better way? devprop?)

	* If a device is cloning, always call the close entry
	  point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:04:54 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.1.2.1: +314 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD.

Revision 1.1.2.1, Sun Nov 5 04:06:13 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.1: +0 -314 lines
FILE REMOVED

file sysmon_envsys.c was added on branch thorpej_scsipi on 2000-11-22 16:04:54 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 5 04:06:13 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej_scsipi, thorpej-devvp, nathanw_sa, kqueue

Split the envsys and watchdog parts of sysmon into their own
files.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>