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


Keyword substitution: kv
Default branch: MAIN


Revision 1.151: download - view: text, markup, annotated - select for diffs
Fri May 20 21:31:24 2022 UTC (2 years, 9 months ago) by andvar
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, 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
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +3 -3 lines
s/appropiate/appropriate/ in comments and readme file.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Fri Dec 31 14:30:04 2021 UTC (3 years, 2 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +21 -21 lines
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 - view: text, markup, annotated - select for diffs
Fri Dec 31 11:05:41 2021 UTC (3 years, 2 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +51 -54 lines
sysmon: Delete trailing whitespace.  No functional change intended.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Tue Sep 7 13:24:46 2021 UTC (3 years, 6 months ago) by andvar
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -3 lines
s/aquire/acquire/ in comments, also one typo fix acqure->acquire.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Thu Jun 11 02:39:31 2020 UTC (4 years, 9 months ago) by thorpej
Branches: 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
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +14 -14 lines
Update for proplib(3) API changes.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Mon Jun 8 20:18:13 2020 UTC (4 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +6 -6 lines
Update for proplib(3) API changes.

Revision 1.127.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 7 16:43:40 2020 UTC (4 years, 9 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.127.2.3: preferred, colored; branchpoint 1.127: preferred, colored; next MAIN 1.128: preferred, colored
Changes since revision 1.127.2.3: +13 -12 lines
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 - view: text, markup, annotated - select for diffs
Sun Jun 7 16:41:24 2020 UTC (4 years, 9 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.139.10.1: preferred, colored; branchpoint 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139.10.1: +13 -12 lines
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 - view: text, markup, annotated - select for diffs
Sun Jun 7 16:40:00 2020 UTC (4 years, 9 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.144: preferred, colored; next MAIN 1.145: preferred, colored
Changes since revision 1.144: +13 -12 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 1 21:54:47 2020 UTC (4 years, 9 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +13 -12 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:33 2019 UTC (5 years, 9 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143: +3 -3 lines
Sync with HEAD

Revision 1.144: download - view: text, markup, annotated - select for diffs
Tue Mar 26 15:50:23 2019 UTC (5 years, 11 months ago) by bad
Branches: 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
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 25 07:26:02 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.141.2.1: preferred, colored; branchpoint 1.141: preferred, colored; next MAIN 1.142: preferred, colored
Changes since revision 1.141.2.1: +3 -3 lines
Sync with HEAD

Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat May 26 21:15:46 2018 UTC (6 years, 9 months ago) by thorpej
Branches: 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
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -3 lines
Avoid dereferencing NULL if we attempt to look up an known unit type.

Revision 1.141.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:12 2018 UTC (6 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +8 -2 lines
Sync with HEAD

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat May 5 00:14:28 2018 UTC (6 years, 10 months ago) by pgoyette
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +8 -2 lines
Defend against some table-lookup-not-found errors.

Revision 1.125.2.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:33 2017 UTC (7 years, 3 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.125.2.2: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.2.2: +134 -20 lines
update from HEAD

Revision 1.127.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 24 09:25:26 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.127.2.2: preferred, colored; branchpoint 1.127: preferred, colored
Changes since revision 1.127.2.2: +3 -3 lines
Fix fallout from ticket #1511:
It's rnd_detach_source, not rnd_detach_sources.

Revision 1.127.2.1.6.2: download - view: text, markup, annotated - select for diffs
Tue Oct 24 09:24:53 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7-1
CVS tags: netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE
Diff to: previous 1.127.2.1.6.1: preferred, colored; branchpoint 1.127.2.1: preferred, colored; next MAIN 1.127.2.2: preferred, colored
Changes since revision 1.127.2.1.6.1: +3 -3 lines
Fix fallout from ticket #1511:
It's rnd_detach_source, not rnd_detach_sources.

Revision 1.127.2.1.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 24 09:24:32 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.127.2.1.2.1: preferred, colored; branchpoint 1.127.2.1: preferred, colored; next MAIN 1.127.2.2: preferred, colored
Changes since revision 1.127.2.1.2.1: +3 -3 lines
Fix fallout from ticket #1511:
It's rnd_detach_source, not rnd_detach_sources.

Revision 1.127.2.2: download - view: text, markup, annotated - select for diffs
Mon Oct 23 18:57:12 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.127.2.1: preferred, colored; branchpoint 1.127: preferred, colored
Changes since revision 1.127.2.1: +8 -2 lines
Apply patch (requested by pgoyette in ticket #1511):
Detach the rndsrc before re-attaching it.

Revision 1.127.2.1.6.1: download - view: text, markup, annotated - select for diffs
Mon Oct 23 18:57:09 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7-1
Diff to: previous 1.127.2.1: preferred, colored
Changes since revision 1.127.2.1: +8 -2 lines
Apply patch (requested by pgoyette in ticket #1511):
Detach the rndsrc before re-attaching it.

Revision 1.127.2.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Oct 23 18:57:08 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.127.2.1: preferred, colored
Changes since revision 1.127.2.1: +8 -2 lines
Apply patch (requested by pgoyette in ticket #1511):
Detach the rndsrc before re-attaching it.

Revision 1.139.10.1: download - view: text, markup, annotated - select for diffs
Sat Sep 23 17:22:48 2017 UTC (7 years, 5 months ago) by snj
Branches: 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
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +43 -9 lines
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 - view: text, markup, annotated - select for diffs
Mon Sep 11 06:02:09 2017 UTC (7 years, 6 months ago) by pgoyette
Branches: 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
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +36 -9 lines
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 - view: text, markup, annotated - select for diffs
Wed Sep 6 11:08:53 2017 UTC (7 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +9 -2 lines
 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 - view: text, markup, annotated - select for diffs
Sun Dec 27 12:09:58 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.128.2.2: preferred, colored; branchpoint 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128.2.2: +5 -5 lines
Sync with HEAD (as of 26th Dec)

Revision 1.139: download - view: text, markup, annotated - select for diffs
Mon Dec 14 01:08:47 2015 UTC (9 years, 3 months ago) by pgoyette
Branches: 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
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 13 17:41:48 2015 UTC (9 years, 3 months ago) by jdc
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +4 -4 lines
Note the sensor number in the error output.  Useful for drivers adding
multiple sensors.

Revision 1.128.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:13 2015 UTC (9 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.128.2.1: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.2.1: +120 -51 lines
Sync with HEAD

Revision 1.137: download - view: text, markup, annotated - select for diffs
Sat Apr 25 23:40:09 2015 UTC (9 years, 10 months ago) by pgoyette
Branches: MAIN
CVS tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +10 -10 lines
Handle early initialization requirements - thanks martin@ and others

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sat Apr 25 14:06:58 2015 UTC (9 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +21 -5 lines
make things boot again, from martin.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Sat Apr 25 02:41:42 2015 UTC (9 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +4 -4 lines
Use tabs for indentation.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sat Apr 25 00:54:14 2015 UTC (9 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +3 -2 lines
Release the mutex in the error path.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Fri Apr 24 11:34:14 2015 UTC (9 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +3 -3 lines
The sysmon_envsys module also depends on sysmon_power (for delivery of
sensor events to userland).

Revision 1.132: download - view: text, markup, annotated - select for diffs
Fri Apr 24 03:32:25 2015 UTC (9 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +2 -3 lines
Remove a left-over debugging printf()

Revision 1.131: download - view: text, markup, annotated - select for diffs
Thu Apr 23 23:22:03 2015 UTC (9 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +57 -4 lines
Modularize sysmon and its components

Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Apr 13 16:33:25 2015 UTC (9 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +3 -3 lines
Convert sys/dev to use <sys/rndsource.h>.

Revision 1.127.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 18:45:30 2015 UTC (9 years, 11 months ago) by snj
Branches: 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
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:13 2015 UTC (9 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +4 -2 lines
Sync with HEAD

Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Mar 14 09:52:49 2015 UTC (10 years ago) by hannken
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Nov 23 10:00:20 2014 UTC (10 years, 3 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +15 -6 lines
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 - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:50 2014 UTC (10 years, 7 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.125.2.1: preferred, colored; branchpoint 1.125: preferred, colored
Changes since revision 1.125.2.1: +34 -4 lines
Rebase to HEAD as of a few days ago.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Sun Aug 10 16:44:36 2014 UTC (10 years, 7 months ago) by tls
Branches: MAIN
CVS tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +34 -4 lines
Merge tls-earlyentropy branch into HEAD.

Revision 1.126.10.1: download - view: text, markup, annotated - select for diffs
Mon Apr 7 03:37:33 2014 UTC (10 years, 11 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.126: preferred, colored; next MAIN 1.127: preferred, colored
Changes since revision 1.126: +34 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 25 00:29:32 2013 UTC (12 years ago) by tls
Branches: tls-maxphys
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +19 -2 lines
resync with head

Revision 1.117.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 16 05:33:33 2013 UTC (12 years, 2 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.117.2.2: preferred, colored; branchpoint 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117.2.2: +19 -2 lines
sync with (a bit old) head

Revision 1.126: download - view: text, markup, annotated - select for diffs
Thu Nov 29 10:29:45 2012 UTC (12 years, 3 months ago) by msaitoh
Branches: 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
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +19 -2 lines
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 - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:03 2012 UTC (12 years, 4 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.117.2.1: preferred, colored; branchpoint 1.117: preferred, colored
Changes since revision 1.117.2.1: +86 -56 lines
sync with head

Revision 1.117.8.2: download - view: text, markup, annotated - select for diffs
Fri Oct 19 17:28:01 2012 UTC (12 years, 5 months ago) by riz
Branches: 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
Diff to: previous 1.117.8.1: preferred, colored; branchpoint 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117.8.1: +3 -3 lines
Remove stray CR characters introduced in ticket #544.  From pgoyette.

Revision 1.117.8.1: download - view: text, markup, annotated - select for diffs
Wed Oct 17 21:06:56 2012 UTC (12 years, 5 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Sep 6 12:21:40 2012 UTC (12 years, 6 months ago) by pgoyette
Branches: MAIN
CVS tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +2 -3 lines
Remove (commented-out) definitions for debugging - thanks to macallan@
for defflagging these.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Mon Aug 27 14:15:52 2012 UTC (12 years, 6 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +4 -4 lines
Fix indentation.  No code change.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Mon Aug 27 14:08:36 2012 UTC (12 years, 6 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +15 -16 lines
Simplify some logic - no functional change intended.

While here, clean up a couple of comments.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Jul 19 13:31:06 2012 UTC (12 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +18 -9 lines
Make sure to re-add the sensor as an entropy source after user request
to reset (via envstat -S)

Revision 1.121: download - view: text, markup, annotated - select for diffs
Mon Jul 16 13:55:01 2012 UTC (12 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +25 -39 lines
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 - view: text, markup, annotated - select for diffs
Sun Jul 15 18:33:07 2012 UTC (12 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +46 -10 lines
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 - view: text, markup, annotated - select for diffs
Sun Jul 15 17:41:39 2012 UTC (12 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -2 lines
When unregistering a sensor device, make sure we unregister and delete
all the associated events.

Revision 1.117.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:04 2012 UTC (12 years, 11 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +4 -2 lines
sync with head

Revision 1.117.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:02 2012 UTC (13 years, 1 month ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +4 -2 lines
merge to -current.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Sat Feb 18 01:08:00 2012 UTC (13 years, 1 month ago) by matt
Branches: 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
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +4 -2 lines
Don't export sysmon_envsys_list as a common.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Mon Aug 1 12:28:53 2011 UTC (13 years, 7 months ago) by mbalmer
Branches: 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
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -3 lines
According to the Oxford Dictionary of Etymology, a wether is a male sheep
or ram.

Revision 1.112.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:20:09 2011 UTC (13 years, 8 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.112: preferred, colored; next MAIN 1.113: preferred, colored
Changes since revision 1.112: +103 -219 lines
Catchup with rmind-uvmplock merge.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Sun Jun 19 11:40:26 2011 UTC (13 years, 9 months ago) by martin
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +7 -2 lines
Instead of crashing, print a usable error message when a driver eroneously
does not properly initialize sensor state.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Jun 15 13:34:13 2011 UTC (13 years, 9 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +11 -9 lines
Previous fix broke the setting of current value for Indicator and
Battery-Charge sensors.  Fix this.

Revision 1.97.2.3: download - view: text, markup, annotated - select for diffs
Sun Jun 12 00:24:26 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.97.2.2: preferred, colored; next MAIN 1.98: preferred, colored
Changes since revision 1.97.2.2: +95 -218 lines
sync with head

Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed Jun 8 18:22:24 2011 UTC (13 years, 9 months ago) by pgoyette
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +94 -200 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 6 09:08:39 2011 UTC (13 years, 9 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.112: preferred, colored; next MAIN 1.113: preferred, colored
Changes since revision 1.112: +5 -22 lines
Sync with HEAD.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Sat Jun 4 13:24:33 2011 UTC (13 years, 9 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +5 -22 lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 5 20:54:08 2011 UTC (14 years ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.97.2.1: preferred, colored
Changes since revision 1.97.2.1: +78 -81 lines
sync with head

Revision 1.112: download - view: text, markup, annotated - select for diffs
Thu Dec 30 03:59:59 2010 UTC (14 years, 2 months ago) by pgoyette
Branches: 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
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +10 -4 lines
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 - view: text, markup, annotated - select for diffs
Thu Dec 16 16:08:57 2010 UTC (14 years, 3 months ago) by njoly
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Dec 15 17:17:16 2010 UTC (14 years, 3 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +44 -81 lines
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 - view: text, markup, annotated - select for diffs
Sat Dec 11 15:17:15 2010 UTC (14 years, 3 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +36 -11 lines
Handle removal of limit properties correctly, even for sensors that
provide their own internal limit(s).

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Dec 8 00:09:14 2010 UTC (14 years, 3 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +6 -4 lines
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 - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:12 2010 UTC (14 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.83.4.4: preferred, colored; branchpoint 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83.4.4: +112 -27 lines
sync with head.

Revision 1.97.2.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:43 2010 UTC (14 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +102 -22 lines
sync with head

Revision 1.94.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:50 2010 UTC (14 years, 10 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94: +155 -40 lines
Sync with HEAD.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sun Apr 11 01:12:28 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +4 -5 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 10 19:01:00 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +33 -11 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 3 13:55:09 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +10 -4 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 1 12:16:14 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 27 13:34:16 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +5 -5 lines
Constify the args to sysmon_envsys_foreach_sensor()'s callback function.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Sat Mar 27 13:23:18 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +12 -5 lines
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 - view: text, markup, annotated - select for diffs
Fri Mar 26 21:06:25 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Mar 26 20:31:06 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +29 -2 lines
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 - view: text, markup, annotated - select for diffs
Fri Mar 26 12:36:59 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +18 -5 lines
Export the sensor device's class.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Mar 24 12:15:54 2010 UTC (14 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +12 -7 lines
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 - view: text, markup, annotated - select for diffs
Sun Mar 14 18:03:15 2010 UTC (15 years ago) by pgoyette
Branches: MAIN
Branch point for: rmind-uvmplock
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +12 -7 lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:04 2010 UTC (15 years ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.83.4.3: preferred, colored; branchpoint 1.83: preferred, colored
Changes since revision 1.83.4.3: +118 -56 lines
sync with head

Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon Feb 15 22:32:04 2010 UTC (15 years, 1 month ago) by pgoyette
Branches: MAIN
CVS tags: yamt-nfs-mp-base9
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +34 -2 lines
For symmetry, allow warning and critical upper-limits for capacity
sensors.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Feb 14 23:06:01 2010 UTC (15 years, 1 month ago) by pgoyette
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +14 -16 lines
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 - view: text, markup, annotated - select for diffs
Fri Feb 5 17:44:27 2010 UTC (15 years, 1 month ago) by pgoyette
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +4 -3 lines
One more callback of sme_refresh() routine needs to check first that
there is a routine to be called!

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Jan 31 22:53:56 2010 UTC (15 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -3 lines
Fix an outdated comment, noticed by Paul Goyette.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun Jan 31 21:36:38 2010 UTC (15 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +69 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Jan 30 02:46:52 2010 UTC (15 years, 1 month ago) by pgoyette
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +6 -42 lines
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 - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:20 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85: +70 -148 lines
Sync with HEAD.

Revision 1.83.4.3: download - view: text, markup, annotated - select for diffs
Sat Jul 18 14:53:11 2009 UTC (15 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.83.4.2: preferred, colored; branchpoint 1.83: preferred, colored
Changes since revision 1.83.4.2: +4 -74 lines
sync with head.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Jul 10 13:09:09 2009 UTC (15 years, 8 months ago) by pgoyette
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -72 lines
Remove some code (bracketed by #ifdef NOTYET / #endif) that should not
have been committed in the first place.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Wed Jul 8 17:54:27 2009 UTC (15 years, 8 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:29 2009 UTC (15 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.83.4.1: preferred, colored; branchpoint 1.83: preferred, colored
Changes since revision 1.83.4.1: +140 -148 lines
sync with head

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sat Jun 13 16:08:25 2009 UTC (15 years, 9 months ago) by pgoyette
Branches: MAIN
CVS tags: yamt-nfs-mp-base5
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +90 -23 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 8 00:55:35 2009 UTC (15 years, 9 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +63 -141 lines
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 - view: text, markup, annotated - select for diffs
Wed Jun 3 11:43:15 2009 UTC (15 years, 9 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +9 -6 lines
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 - view: text, markup, annotated - select for diffs
Mon May 4 08:13:19 2009 UTC (15 years, 10 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +128 -9 lines
sync with head.

Revision 1.84.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:04 2008 UTC (16 years, 5 months ago) by haad
Branches: haad-dm
Diff to: previous 1.84: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84: +126 -8 lines
Sync with HEAD.

Revision 1.80.6.3: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:31 2008 UTC (16 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.80.6.2: preferred, colored; branchpoint 1.80: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.6.2: +124 -6 lines
Sync with HEAD.

Revision 1.83.6.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:35:10 2008 UTC (16 years, 6 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.83.6.1: preferred, colored; branchpoint 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83.6.1: +126 -8 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri Aug 22 11:27:50 2008 UTC (16 years, 7 months ago) by pgoyette
Branches: 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
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +126 -8 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:30 2008 UTC (16 years, 9 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -3 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.80.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 5 19:14:35 2008 UTC (16 years, 9 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.80.6.1: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.6.1: +2 -1 lines
Sync with HEAD.

Also fix build.

Revision 1.83.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:19 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.83: preferred, colored; next MAIN 1.84: preferred, colored
Changes since revision 1.83: +4 -3 lines
sync with head

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Jun 3 15:00:57 2008 UTC (16 years, 9 months ago) by jmcneill
Branches: 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
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:56 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +232 -200 lines
Sync with HEAD.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Wed Apr 2 11:19:22 2008 UTC (16 years, 11 months ago) by xtraeme
Branches: 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
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -11 lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 1 12:25:30 2008 UTC (16 years, 11 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +213 -195 lines
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 - view: text, markup, annotated - select for diffs
Mon Mar 24 09:39:00 2008 UTC (16 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.8: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.16.8: +30 -8 lines
sync with head.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Mar 23 16:09:41 2008 UTC (17 years ago) by xtraeme
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +30 -8 lines
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 - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:52 2008 UTC (17 years ago) by matt
Branches: matt-armv6
Diff to: previous 1.46.2.2: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.2: +5 -5 lines
sync with HEAD

Revision 1.71.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:25 2008 UTC (17 years, 1 month ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.71.2.2: preferred, colored; branchpoint 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71.2.2: +21 -18 lines
Sync with HEAD.

Revision 1.8.16.8: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:23:35 2008 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.7: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.7: +5 -5 lines
sync with head.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Feb 2 02:02:37 2008 UTC (17 years, 1 month ago) by xtraeme
Branches: 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
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +5 -5 lines
Destroy the callout via sysmon_envsys_destroy() now that it's
initialized in sysmon_envsys_create().

Revision 1.8.16.7: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:44:38 2008 UTC (17 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.6: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.6: +18 -15 lines
sync with head

Revision 1.46.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:54:33 2008 UTC (17 years, 2 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.46.2.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.1: +602 -323 lines
sync with HEAD

Revision 1.75.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:14 2008 UTC (17 years, 2 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.75: preferred, colored; next MAIN 1.76: preferred, colored
Changes since revision 1.75: +18 -15 lines
Sync with HEAD

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Jan 2 12:20:26 2008 UTC (17 years, 2 months ago) by xtraeme
Branches: MAIN
CVS tags: matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +10 -10 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Jan 2 10:15:53 2008 UTC (17 years, 2 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +8 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Jan 2 03:06:02 2008 UTC (17 years, 2 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +4 -6 lines
Use LIST_FOREACH().

Revision 1.76: download - view: text, markup, annotated - select for diffs
Wed Jan 2 02:29:14 2008 UTC (17 years, 2 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -4 lines
Use TAILQ_FOREACH().

Revision 1.45.4.7: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:37:59 2007 UTC (17 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.45.4.6: preferred, colored; branchpoint 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45.4.6: +4 -4 lines
Sync with HEAD.

Revision 1.71.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:19:58 2007 UTC (17 years, 3 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.71.2.1: preferred, colored; branchpoint 1.71: preferred, colored
Changes since revision 1.71.2.1: +7 -14 lines
Sync with HEAD.

Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:31 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74: +4 -4 lines
Sync with head.

Revision 1.8.16.6: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:31:24 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.5: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.5: +588 -312 lines
sync with head

Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed Dec 5 06:52:27 2007 UTC (17 years, 3 months ago) by ad
Branches: 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
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +4 -4 lines
MUTEX_SPIN -> MUTEX_DEFAULT.

Revision 1.45.4.6: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:55:48 2007 UTC (17 years, 4 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.45.4.5: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.4.5: +588 -312 lines
Sync with HEAD.

Revision 1.69.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:19:41 2007 UTC (17 years, 4 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.69.2.2: preferred, colored; branchpoint 1.69: preferred, colored; next MAIN 1.70: preferred, colored
Changes since revision 1.69.2.2: +7 -14 lines
Sync with HEAD

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Nov 20 17:27:35 2007 UTC (17 years, 4 months ago) by xtraeme
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -6 lines
Update a comment.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Tue Nov 20 17:24:32 2007 UTC (17 years, 4 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +6 -10 lines
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 - view: text, markup, annotated - select for diffs
Mon Nov 19 00:48:23 2007 UTC (17 years, 4 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +596 -313 lines
Sync with HEAD.

Revision 1.69.2.2: download - view: text, markup, annotated - select for diffs
Sun Nov 18 19:35:41 2007 UTC (17 years, 4 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.69.2.1: preferred, colored; branchpoint 1.69: preferred, colored
Changes since revision 1.69.2.1: +592 -309 lines
Sync with HEAD

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Nov 16 08:00:16 2007 UTC (17 years, 4 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +596 -313 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 15 11:44:31 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.4: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.4: +35 -18 lines
sync with head.

Revision 1.69.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:01:38 2007 UTC (17 years, 4 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +35 -18 lines
Sync with HEAD

Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:30:19 2007 UTC (17 years, 4 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +685 -452 lines
sync with HEAD

Revision 1.45.4.5: download - view: text, markup, annotated - select for diffs
Sun Nov 4 21:03:29 2007 UTC (17 years, 4 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.45.4.4: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.4.4: +35 -18 lines
Sync with HEAD.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Nov 3 23:05:21 2007 UTC (17 years, 4 months ago) by xtraeme
Branches: MAIN
CVS tags: jmcneill-base
Branch point for: mjf-devfs
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +24 -16 lines
- 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 - view: text, markup, annotated - select for diffs
Fri Nov 2 19:21:29 2007 UTC (17 years, 4 months ago) by plunky
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +13 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Oct 27 11:34:20 2007 UTC (17 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.3: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.3: +534 -362 lines
sync with head.

Revision 1.67.2.2: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:19 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.67.2.1: preferred, colored; branchpoint 1.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67.2.1: +325 -147 lines
sync with head.

Revision 1.17.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:42:05 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.17.2.3: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.3: +663 -447 lines
Sync with head.

Revision 1.45.4.4: download - view: text, markup, annotated - select for diffs
Sun Oct 7 13:25:05 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.45.4.3: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.4.3: +325 -147 lines
Sync with HEAD.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Oct 7 04:11:15 2007 UTC (17 years, 5 months ago) by xtraeme
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +325 -147 lines
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 - view: text, markup, annotated - select for diffs
Sat Oct 6 15:31:32 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -2 lines
sync with head.

Revision 1.45.4.3: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:28:40 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.45.4.2: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.4.2: +217 -223 lines
Sync with HEAD.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Sep 24 19:46:38 2007 UTC (17 years, 5 months ago) by xtraeme
Branches: MAIN
CVS tags: yamt-x86pmap-base2
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Sep 10 10:55:22 2007 UTC (17 years, 6 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.24.2.2: preferred, colored; branchpoint 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.2: +216 -223 lines
Sync with HEAD.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Sep 9 12:28:08 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
CVS tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +6 -6 lines
Change the DPRINTFs in sysmon_envsys_destroy_plist() to DPRINTFOBJs
(second level of verbosity).

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Sep 8 23:59:38 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -2 lines
sysmon_envsys_register: don't forget to clear SME_FLAG_BUSY when
registration succeeds.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Sep 8 23:21:02 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +4 -4 lines
Use DPRINTF for a debugging printf.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Sep 8 23:14:13 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -4 lines
Remove an unused variable.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Sep 8 22:42:37 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +25 -11 lines
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 - view: text, markup, annotated - select for diffs
Sat Sep 8 15:47:37 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +8 -5 lines
Don't forget to free sme_evdrv in non error case too. Noticed and
reviewed by rmind.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Sep 8 15:25:18 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +24 -10 lines
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 - view: text, markup, annotated - select for diffs
Sat Sep 8 03:41:28 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
Disable debug, committed accidentally in previous.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Sep 8 03:37:51 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +8 -3 lines
sysmon_envsys_register: only call sme_event_unregister_all when any
other error than EEXIST is returned.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Sep 8 03:17:38 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +85 -71 lines
- 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 - view: text, markup, annotated - select for diffs
Sat Sep 8 00:58:32 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -4 lines
Remove another COMPAT_40 block, found by rmind@.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Sep 8 00:21:43 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +43 -48 lines
- 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 - view: text, markup, annotated - select for diffs
Tue Sep 4 16:54:02 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +77 -127 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Sep 3 16:48:39 2007 UTC (17 years, 6 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.45.4.1: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.4.1: +290 -246 lines
Sync with HEAD.

Revision 1.8.16.3: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:38:49 2007 UTC (17 years, 6 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.2: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.2: +1195 -151 lines
sync with head.

Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:22:00 2007 UTC (17 years, 6 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.24.2.1: preferred, colored; branchpoint 1.24: preferred, colored
Changes since revision 1.24.2.1: +290 -246 lines
Sync with HEAD.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Sep 2 19:36:59 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +61 -18 lines
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 - view: text, markup, annotated - select for diffs
Sat Sep 1 13:43:10 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +71 -65 lines
- 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 - view: text, markup, annotated - select for diffs
Fri Aug 31 22:44:39 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +15 -18 lines
- 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 - view: text, markup, annotated - select for diffs
Fri Aug 31 10:13:27 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +5 -5 lines
Merge sme_event_add() into sme_event_register()... there's no need
to have two different functions for this.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri Aug 31 00:35:08 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +7 -2 lines
Add a few KASSERT(mutex_owned(&foo_lock)) as suggested by Andrew Doran.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Aug 30 23:44:32 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +44 -58 lines
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 - view: text, markup, annotated - select for diffs
Thu Aug 30 21:31:28 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +18 -23 lines
Simplify sysmon_envsys_register() and fix an obvious error in
previous.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Aug 30 18:01:26 2007 UTC (17 years, 6 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +175 -163 lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 20 18:37:49 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.17.2.2: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.2: +358 -135 lines
Sync with HEAD.

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:48:45 2007 UTC (17 years, 7 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +327 -154 lines
Sync with HEAD.

Revision 1.45.4.1: download - view: text, markup, annotated - select for diffs
Thu Aug 9 02:37:14 2007 UTC (17 years, 7 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -3 lines
Sync with HEAD.

Revision 1.46.4.2: download - view: text, markup, annotated - select for diffs
Sun Aug 5 23:16:26 2007 UTC (17 years, 7 months ago) by xtraeme
Branches: matt-mips64
Diff to: previous 1.46.4.1: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.4.1: +1333 -0 lines
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 (17 years, 7 months ago) by xtraeme
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.46: +0 -1333 lines
file sysmon_envsys.c was added on branch matt-mips64 on 2007-08-05 23:16:26 +0000

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Aug 5 23:16:25 2007 UTC (17 years, 7 months ago) by xtraeme
Branches: MAIN
CVS tags: matt-mips64-base
Branch point for: matt-mips64, matt-armv6
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -3 lines
In ENVSYS_SETDICTIONARY if sysmon_envsys_find() returns NULL, do not
call sysmon_envsys_release with a NULL argument.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Jul 29 14:02:29 2007 UTC (17 years, 7 months ago) by xtraeme
Branches: MAIN
CVS tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +14 -19 lines
- 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 - view: text, markup, annotated - select for diffs
Fri Jul 27 11:59:09 2007 UTC (17 years, 7 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +7 -6 lines
Change locking stuff in sysmon_envsys_register() and
sysmon_envsys_createplist().

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jul 23 17:51:16 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +5 -4 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Jul 23 08:45:51 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +9 -7 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Jul 22 18:17:03 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +140 -135 lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 21 22:11:02 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +35 -13 lines
- 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 - view: text, markup, annotated - select for diffs
Sat Jul 21 17:18:00 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +7 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 21 16:16:59 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 21 15:45:12 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -11 lines
Simplify previous.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Jul 21 15:30:04 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +10 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 21 15:16:58 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +62 -43 lines
- 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 - view: text, markup, annotated - select for diffs
Sat Jul 21 12:11:27 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +41 -55 lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 21 00:05:54 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +7 -2 lines
Re-add a strlcpy() to copy the new description in edata->desc, if the
object in dictionary was updated succesfully.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Jul 20 14:59:58 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -2 lines
Add another missing break if updating the drive-state object fails.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Jul 20 10:47:25 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -2 lines
Add a missing break if error when setting a new description.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Jul 20 10:40:07 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +122 -48 lines
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 - view: text, markup, annotated - select for diffs
Thu Jul 19 17:06:25 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -2 lines
sysmon_envsys_unregister: do not kmem_free(9) with the mutex held.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Jul 19 09:29:48 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -2 lines
sme_register_sensorname: don't forget to kmem_free(9) before returning
EEXIST.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jul 19 00:12:47 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +81 -31 lines
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 - view: text, markup, annotated - select for diffs
Wed Jul 18 20:31:41 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -2 lines
- 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 - view: text, markup, annotated - select for diffs
Wed Jul 18 20:23:10 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -2 lines
sme_make_dictionary: if prop_array_add() fails, don't forget to release
the dictionary. Pointed out by yamt@.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Jul 17 17:56:04 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
CVS tags: nick-csl-alignment-base
Branch point for: nick-csl-alignment
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +18 -9 lines
Add more debugging printfs to catch sensors with duplicate description,
and some cosmetic ones.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Jul 17 16:47:58 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +47 -7 lines
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 - view: text, markup, annotated - select for diffs
Tue Jul 17 15:43:08 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +6 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jul 16 17:48:52 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -8 lines
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 - view: text, markup, annotated - select for diffs
Sun Jul 15 15:52:49 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.1: +892 -151 lines
Sync with head.

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:21:45 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +38 -2 lines
Sync with head.

Revision 1.17.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:08:24 2007 UTC (17 years, 8 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +928 -151 lines
Sync with head.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Jul 4 16:30:18 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
CVS tags: mjf-ufs-trans-base
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +12 -22 lines
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 - view: text, markup, annotated - select for diffs
Mon Jul 2 15:18:30 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +5 -5 lines
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 - view: text, markup, annotated - select for diffs
Sun Jul 1 07:36:45 2007 UTC (17 years, 8 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +938 -151 lines
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 - view: text, markup, annotated - select for diffs
Mon Mar 12 05:57:13 2007 UTC (18 years ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13: +3 -3 lines
Sync with HEAD.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:02:45 2007 UTC (18 years ago) by christos
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Feb 19 06:08:37 2007 UTC (18 years, 1 month ago) by ad
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +30 -31 lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 19 00:36:12 2007 UTC (18 years, 1 month ago) by xtraeme
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -12 lines
Replace SYSMON_ENVSYS_{LOCK,UNLOCK} with mutex_{enter,exit}.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Feb 18 23:38:11 2007 UTC (18 years, 1 month ago) by xtraeme
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +29 -22 lines
* 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 - view: text, markup, annotated - select for diffs
Sat Dec 30 20:49:38 2006 UTC (18 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8.16.1: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.16.1: +8 -8 lines
sync with head.

Revision 1.11.6.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:18:16 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.11.6.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.6.1: +8 -8 lines
sync with head.

Revision 1.11.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:34:50 2006 UTC (18 years, 4 months ago) by ad
Branches: newlock2
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +8 -6 lines
Sync with head.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:26 2006 UTC (18 years, 4 months ago) by christos
Branches: 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
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +8 -8 lines
__unused removal on arguments; approved by core.

Revision 1.11.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:06:51 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +8 -6 lines
sync with head

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:31:59 2006 UTC (18 years, 5 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +8 -6 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.9.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:55:16 2006 UTC (18 years, 6 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +6 -6 lines
sync with head

Revision 1.9.8.2: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:45:19 2006 UTC (18 years, 7 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.9.8.1: preferred, colored; branchpoint 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.8.1: +2 -4 lines
sync with head

Revision 1.10.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:43 2006 UTC (18 years, 8 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +2 -4 lines
Merge from HEAD.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Jul 8 20:26:06 2006 UTC (18 years, 8 months ago) by christos
Branches: 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
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -4 lines
expose the ioctl internal function now used by the acpi_apm code.

Revision 1.8.16.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:07:30 2006 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +10 -8 lines
sync with head.

Revision 1.9.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:39:37 2006 UTC (18 years, 11 months ago) by simonb
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +6 -4 lines
Sync with head.

Revision 1.9.10.1: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:26:20 2006 UTC (18 years, 11 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +6 -4 lines
sync with head.

Revision 1.9.8.1: download - view: text, markup, annotated - select for diffs
Sat Apr 1 12:07:28 2006 UTC (18 years, 11 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -4 lines
sync with head.

Revision 1.9.12.1: download - view: text, markup, annotated - select for diffs
Tue Mar 28 09:42:16 2006 UTC (18 years, 11 months ago) by tron
Branches: peter-altq
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +6 -4 lines
Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 20 03:23:35 2006 UTC (19 years ago) by lukem
Branches: 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
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 11 12:23:56 2005 UTC (19 years, 3 months ago) by christos
Branches: 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
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +6 -6 lines
merge ktrace-lwp.

Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:33:42 2004 UTC (20 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.3: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.3: +6 -6 lines
Fix the sync with head I botched.

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:51:34 2004 UTC (20 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.2: preferred, colored
Changes since revision 1.6.2.2: +6 -6 lines
Sync with HEAD.

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:51:29 2004 UTC (20 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.1: preferred, colored
Changes since revision 1.6.2.1: +27 -8 lines
Sync with HEAD

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Aug 11 15:07:14 2003 UTC (21 years, 7 months ago) by yamt
Branches: 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
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +8 -5 lines
do wakeup() only when someone is waiting for us.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Aug 11 14:24:41 2003 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +24 -8 lines
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 - view: text, markup, annotated - select for diffs
Wed Jul 2 15:26:22 2003 UTC (21 years, 8 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +6 -6 lines
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 - view: text, markup, annotated - select for diffs
Sun Jun 29 22:30:50 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Jun 28 14:21:45 2003 UTC (21 years, 8 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +6 -6 lines
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 - view: text, markup, annotated - select for diffs
Fri Jan 3 17:08:12 2003 UTC (22 years, 2 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.1.4.3: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.3: +21 -17 lines
Sync with HEAD.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Dec 31 05:26:56 2002 UTC (22 years, 2 months ago) by explorer
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +21 -17 lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 28 04:14:26 2002 UTC (23 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.1.4.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.4.2: +2 -2 lines
Catch up to -current.

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Fri Jan 11 23:39:35 2002 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.4.1: +22 -31 lines
More catchup.

Revision 1.1.6.1: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:58:36 2002 UTC (23 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +24 -30 lines
Sync kqueue branch with -current.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jan 3 22:35:53 2002 UTC (23 years, 2 months ago) by jdolecek
Branches: 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
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +22 -31 lines
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 - view: text, markup, annotated - select for diffs
Wed Nov 14 19:16:09 2001 UTC (23 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
Catch up to -current.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 06:28:55 2001 UTC (23 years, 4 months ago) by lukem
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
add RCSIDs

Revision 1.1.8.1: download - view: text, markup, annotated - select for diffs
Tue Sep 18 19:13:51 2001 UTC (23 years, 6 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +6 -6 lines
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 - view: text, markup, annotated - select for diffs
Wed Nov 22 16:04:54 2000 UTC (24 years, 4 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.1: +314 -0 lines
Sync with HEAD.

Revision 1.1.2.1
Sun Nov 5 04:06:13 2000 UTC (24 years, 4 months ago) by bouyer
Branches: thorpej_scsipi
FILE REMOVED
Changes since revision 1.1: +0 -314 lines
file sysmon_envsys.c was added on branch thorpej_scsipi on 2000-11-22 16:04:54 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Nov 5 04:06:13 2000 UTC (24 years, 4 months ago) by thorpej
Branches: 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.

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>