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).
(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).
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
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
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.