Lines Matching defs:envstat

1583 init_temp_arrays(struct temp_stats *envstat)
1587 envstat->index = 0;
1590 envstat->l1[i] = NA_TEMP;
1594 envstat->l2[i] = NA_TEMP;
1598 envstat->l3[i] = NA_TEMP;
1602 envstat->l4[i] = NA_TEMP;
1606 envstat->l5[i] = NA_TEMP;
1609 envstat->max = NA_TEMP;
1610 envstat->min = NA_TEMP;
1611 envstat->trend = TREND_UNKNOWN;
1612 envstat->version = TEMP_KSTAT_VERSION;
1613 envstat->override = NA_TEMP;
1625 update_temp(dev_info_t *pdip, struct temp_stats *envstat, uchar_t value)
1646 envstat->index++;
1647 index = envstat->index;
1664 if (envstat->l4[i] != NA_TEMP) {
1665 total += (int)envstat->l4[i];
1675 envstat->l5[tmp_index] = total/count;
1677 envstat->l5[tmp_index] = NA_TEMP;
1690 if (envstat->l3[i] != NA_TEMP) {
1691 total += (int)envstat->l3[i];
1701 envstat->l4[tmp_index] = total/count;
1703 envstat->l4[tmp_index] = NA_TEMP;
1716 if (envstat->l2[i] != NA_TEMP) {
1717 total += (int)envstat->l2[i];
1727 envstat->l3[tmp_index] = total/count;
1729 envstat->l3[tmp_index] = NA_TEMP;
1742 if (envstat->l1[i] != NA_TEMP) {
1743 total += (int)envstat->l1[i];
1753 envstat->l2[tmp_index] = total/count;
1755 envstat->l2[tmp_index] = NA_TEMP;
1760 if (envstat->override != NA_TEMP) {
1762 real_temp = envstat->override;
1769 envstat->l1[index % L1_SZ] = real_temp;
1776 if (temp_state != envstat->state) {
1782 if (temp_state > envstat->state) {
1783 if (envstat->state == TEMP_OK) {
1793 envstat->temp_cnt = 0;
1794 envstat->state = temp_state;
1811 envstat->shutdown_cnt = 1;
1846 } else if (temp_state < envstat->state) {
1851 envstat->shutdown_cnt = 0;
1854 if (envstat->temp_cnt == 0) {
1855 envstat->temp_cnt = TEMP_STATE_COUNT;
1856 } else if (--envstat->temp_cnt == 0) {
1883 if (envstat->state == TEMP_DANGER &&
1893 envstat->state = temp_state;
1899 envstat->temp_cnt = 0;
1906 if ((envstat->shutdown_cnt++ >= SHUTDOWN_COUNT) &&
1928 if ((envstat->max == NA_TEMP) || (real_temp > envstat->max)) {
1929 envstat->max = real_temp;
1932 if ((envstat->min == NA_TEMP) || (real_temp < envstat->min)) {
1933 envstat->min = real_temp;
1944 envstat->trend = temp_trend(envstat);
1948 if (envstat->trend == TREND_RAPID_RISE &&