summaryrefslogtreecommitdiff
path: root/sys/dev/sysmon
AgeCommit message (Collapse)Author
2010-03-19Modify previous commit. The routine to deliver events is intended to bepgoyette
exported to device drivers, so rename it and move the declaration to <dev/sysmon/sysmonvar.h>
2010-03-19Separate event delivery from polling and limit evaluation inpgoyette
sme_events_worker(). Provide a wrapper that can be called from sensor drivers' interrupt routines to find and deliver a specific event. XXX Actually updating sensor drivers (and their parent devices) to XXX have interrupts is a future enhancement. This is simply an XXX enabler.
2010-03-14Retire the 'monitor' member of the envsys_data_t. It was only used inpgoyette
one place, and functioned as a logical OR of the ENVSYS_FMON* flag bits.
2010-03-11Fix comment typos (mangement, managmenet).jruoho
2010-02-28Move definitions of internal data structures and flag bits to avoidpgoyette
exposing them to user-land.
2010-02-18If we're going to valdate things, at least do it correctly.pgoyette
2010-02-15For symmetry, allow warning and critical upper-limits for capacitypgoyette
sensors.
2010-02-14Replace large amount of replicated code with a macro to improve readability.pgoyette
2010-02-14Remove the flags member of the limits structure. Its value was onlypgoyette
meaningful for a few limited function calls; all persitent storage of limit-present flags is maintained in the edata->upropset member.
2010-02-14Correct one more instance of checking flags in the wrong place.pgoyette
2010-02-13When checking current sensor value vs limits, check the correct set ofpgoyette
flags to determine which limits are present.
2010-02-05Fix a typo in one DPRINTF (s/edata->des/edata->desc/).jruoho
2010-02-05One more callback of sme_refresh() routine needs to check first thatpgoyette
there is a routine to be called!
2010-02-04If the AC adapter is flagged with SME_DISABLE_REFRESH, don't try to callpgoyette
its refresh() callback. Just assume that its value has been properly updated by other means.
2010-01-31Fix an outdated comment, noticed by Paul Goyette.martin
2010-01-31Add a convenience function to find the maximum value currently reportedmartin
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.
2010-01-31print newline after timer expiry messagepooka
2010-01-30Make swwdog use no-needs-count. As the manpage says, there can be only one.pooka
2010-01-30Validate limit-based monitoring in one place, so we can apply thepgoyette
constraints to both driver-requested and user-requested monitoring. While here, clean up some of the debugging DPRINTFs.
2010-01-26Move the limits out of the event structure and into the main sensor.pgoyette
Use the limits_flags only for calls to the {get,set}_limits() callbacks and merge the results into upropset, rather than trying to maintain both values (error prone).
2010-01-18If no limits are exceeded, make sure we set state to SVALIDpgoyette
2010-01-02Flags for existence of limit values need to be propagated to thepgoyette
event data. Otherwise, they're not processed. XXX This needs to be rethought. While fixing it this way makes things XXX "work", we really shouldn't need to replicate these flags. The XXX limits and their flags should be kept as part of the sensor data, XXX and not part of the event-monitor data. I'll work on this in the XXX near future.
2010-01-01Don't infer a sensor driver's ability to handle limit checking itself.pgoyette
2009-12-23Check for value exceeding crit-max limit before checking against warn-maxpgoyette
limit. Otherwise we'll never notice if we exceed crit-max (assuming that crit-max is at least as large as warn-max).
2009-11-06Fix POWER_IOC_GET_TYPE.jakllsch
The longest string in use with this seems to have been "acpi", so size_t covered that, but on 32-bit ports omited the NUL.
2009-07-10Document usage of PROP_DRIVER_LIMITS flag and set it correctly.pgoyette
Use flag bits to determine validity of limit values, rather than assuming that invalid/not-present values are set to zero.
2009-07-10Remove some code (bracketed by #ifdef NOTYET / #endif) that should notpgoyette
have been committed in the first place.
2009-07-08Remove driver name from debug message. Not all drivers have set thispgoyette
early enough, and we can easily figure out the driver name from some subsequent debug messages.
2009-07-08Initialize lims.sel_flags before using it. Prevents spurious limitpgoyette
events being created for devices that don't provide internal limits. Thanks to Mattias for finding this.
2009-07-08Clean up a couple of debug statements that got missed previously.pgoyette
2009-06-14Ooops - {get,set}_limits() need to be sensor-specific. Pass an extrapgoyette
argument to them to identify the individual sensor being processed.
2009-06-13Add capability to send sensor limit values to the driver so they canpgoyette
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.)
2009-06-08Correct typo in last so we can #undef the correct macro.pgoyette
2009-06-08General clean-up and some restructuring of event handling. This is apgoyette
precursor to letting sensor drivers actually exchange limits/thresholds with user-land.
2009-06-03Don't allocate the private list-threading structure unless we're goingpgoyette
to use it. Otherwise we end up leaking little bits of memory for each sensor that is not monitored at time of initial registration.
2009-06-01Since we no longer have individual events for each sensor value limit,pgoyette
we don't need individual flag bits. Clean up extra bit definitions. Bump kernel version - welcome to 5.99.13
2009-04-07Fix spelling: mak -> make.dyoung
2008-11-11Fix typo in previous, and wrap a panic with #ifdef DIAGNOSTICpgoyette
2008-11-11Initialize event's "previous sent state" based on the event monitor type,pgoyette
regardless of sensor type. Fixes spurious "device: normal state on 'sensor-name' messages (reported by ad@) which interfere with sysinst.
2008-11-04Fix cut&paste error in prevpgoyette
2008-11-04Restore previous behavior concerning CRITICAL events. Send an eventpgoyette
whenever state enters or exits CRITICAL, or whenever value of sensor changes while the state is CRITICAL.
2008-09-07Only report new sensor state values if the new value is valid for thepgoyette
particular event being monitored. This avoids duplicate reporting for sensors that monitor both a normal/critical state and value-within-limits state as reported by Simon Burge on current-users. While we're here, clean-up some stair-stepping if's. OK garbled@
2008-09-05Rearrange code in the sysmon queue execution thread to simplify locking logic.gmcgarry
Removes unreachable code warning.
2008-09-05Rearrange sysmonread_power() to have a single exit point, which simplifiesgmcgarry
the locking and fixes -Wunreachable-code warning.
2008-09-04Initialize event's sent-state appropriately to avoid unnecessary start-uppgoyette
time messages that report a "transition" to the Normal state.
2008-08-221. provide for warning-min and warning-max alarm levels in addition topgoyette
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@
2008-06-11in sme_battery_check(), explicitely check whether the battery isdrochner
present before using the values read, and clean up the logics a bit to make it more understandable
2008-06-03Add SME_POLL_ONLY flag, which informs sme to only refresh the sensor whenjmcneill
it is polled (and not from GTREDATA).
2008-05-10Use aprint when reporting AC adapter status.jmcneill
2008-04-06Pass KTHREAD_MPSAFE to kthread_create(). I've been testing this forxtraeme
some weeks in both UP and SMP without any issue so far.