Lines Matching defs:cur_spd
168 (cpudsp), (((cpudsp)->cpudrv_pm.cur_spd == NULL) ? \
170 (cpudsp)->cpudrv_pm.cur_spd->quant_cnt)); \
326 cpudsp->cpudrv_pm.cur_spd = NULL;
376 cpudsp->cpudrv_pm.cur_spd = NULL;
474 "cur_spd %d, topspeed %d\n", instance,
475 cpupm->cur_spd->pm_level,
480 if (!cpudrv_direct_pm && (cpupm->cur_spd !=
564 if ((cpudrvpm->cur_spd != NULL) &&
565 (level < cpudrvpm->cur_spd->pm_level)) {
623 if ((cpudrvpm->cur_spd != NULL) && (level <
624 cpudrvpm->cur_spd->pm_level)) {
642 cpudrvpm->cur_spd = new_spd;
656 cpudrv_pm_spd_t *cur_spd;
698 cur_spd = kmem_zalloc(sizeof (cpudrv_pm_spd_t), KM_SLEEP);
699 cur_spd->speed = speeds[i];
701 cpupm->head_spd = cur_spd;
702 CPUDRV_TOPSPEED(cpupm) = cur_spd;
703 cur_spd->quant_cnt = CPUDRV_QUANT_CNT_NORMAL;
704 cur_spd->idle_hwm =
705 (cpudrv_idle_hwm * cur_spd->quant_cnt) / 100;
707 cur_spd->idle_lwm = 0;
708 cur_spd->user_hwm = UINT_MAX;
710 cur_spd->quant_cnt = CPUDRV_QUANT_CNT_OTHR;
712 prev_spd->down_spd = cur_spd;
713 cur_spd->up_spd = cpupm->head_spd;
732 cur_spd->idle_hwm =
733 (idle_cnt_percent * cur_spd->quant_cnt) / 100;
734 cur_spd->idle_lwm =
735 (cpudrv_idle_lwm * cur_spd->quant_cnt) / 100;
744 cur_spd->user_hwm = (cpudrv_user_hwm *
745 cur_spd->quant_cnt) / 100;
751 prev_spd = cur_spd;
754 cur_spd->idle_hwm = UINT_MAX;
755 cur_spd->user_lwm = -1;
760 for (cur_spd = cpupm->head_spd; cur_spd; cur_spd = cur_spd->down_spd) {
765 cur_spd->speed,
766 (cur_spd->down_spd ? cur_spd->down_spd->speed : 0),
767 cur_spd->idle_hwm, cur_spd->user_lwm,
768 (cur_spd->up_spd ? cur_spd->up_spd->speed : 0),
769 cur_spd->idle_lwm, cur_spd->user_hwm,
770 cur_spd->quant_cnt));
784 cpudrv_pm_spd_t *cur_spd, *next_spd;
786 cur_spd = cpupm->head_spd;
787 while (cur_spd) {
788 next_spd = cur_spd->down_spd;
789 kmem_free(cur_spd, sizeof (cpudrv_pm_spd_t));
790 cur_spd = next_spd;
802 cpudrv_pm_spd_t *cur_spd;
820 for (i = cpupm->num_spd, cur_spd = cpupm->head_spd; i > 0;
821 i--, cur_spd = cur_spd->down_spd) {
822 cur_spd->pm_level = i;
824 comp_spd = CPUDRV_COMP_SPEED(cpupm, cur_spd);
836 CPUDRV_COMP_SPRINT(pmc[i], cpupm, cur_spd, comp_spd)
922 if (ret == DDI_SUCCESS && cpudsp->cpudrv_pm.cur_spd == NULL) { \
923 cpudsp->cpudrv_pm.cur_spd = new_spd; \
969 cpudrv_pm_spd_t *cur_spd, *new_spd;
995 cur_spd = cpupm->cur_spd;
1032 if (cur_spd == NULL) {
1034 "cur_spd is unknown\n", ddi_get_instance(dip)));
1091 system_cnt, cur_spd->pm_level, cpupm->pm_busycnt));
1102 if (tick_cnt > cur_spd->quant_cnt) {
1105 ddi_get_instance(dip), tick_cnt, cur_spd->quant_cnt));
1112 idle_cnt = (idle_cnt * cur_spd->quant_cnt) / tick_cnt;
1113 user_cnt = (user_cnt * cur_spd->quant_cnt) / tick_cnt;
1115 if ((user_cnt > cur_spd->user_hwm) || (idle_cnt < cur_spd->idle_lwm &&
1116 cur_spd->idle_blwm_cnt >= cpudrv_idle_blwm_cnt_max)) {
1117 cur_spd->idle_blwm_cnt = 0;
1118 cur_spd->idle_bhwm_cnt = 0;
1124 if (cur_spd == cur_spd->up_spd || cpudrv_direct_pm) {
1127 new_spd = cur_spd->up_spd;
1131 } else if ((user_cnt <= cur_spd->user_lwm) &&
1132 (idle_cnt >= cur_spd->idle_hwm) || !CPU_ACTIVE(cpudsp->cp)) {
1133 cur_spd->idle_blwm_cnt = 0;
1134 cur_spd->idle_bhwm_cnt = 0;
1146 if ((idle_cnt < cur_spd->idle_hwm) &&
1147 (idle_cnt >= cur_spd->idle_lwm) &&
1148 (cur_spd->idle_bhwm_cnt < cpudrv_idle_bhwm_cnt_max)) {
1149 cur_spd->idle_blwm_cnt = 0;
1150 cur_spd->idle_bhwm_cnt++;
1154 if (idle_cnt < cur_spd->idle_lwm) {
1155 cur_spd->idle_blwm_cnt++;
1156 cur_spd->idle_bhwm_cnt = 0;