Lines Matching +full:low +full:- +full:to +full:- +full:high

1 // SPDX-License-Identifier: GPL-2.0
8 * dynamic power management to limit peak CPU temp (using ICTC)
11 * Silly, crazy ideas: use cpu load (from scheduler) and ICTC to extend battery
38 unsigned char low; member
39 unsigned char high; member
46 * dynamic adjustment to minimize # of interrupts */
47 /* configurable values for step size and how much to expand the window when
60 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | maybe_tie | THRM1_TID); in set_thresholds()
63 mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | maybe_tie); in set_thresholds()
77 if (tau[cpu].low >= step_size) { in TAUupdate()
78 tau[cpu].low -= step_size; in TAUupdate()
79 tau[cpu].high -= (step_size - window_expand); in TAUupdate()
82 pr_debug("%s: low threshold crossed\n", __func__); in TAUupdate()
88 if (tau[cpu].high <= 127 - step_size) { in TAUupdate()
89 tau[cpu].low += (step_size - window_expand); in TAUupdate()
90 tau[cpu].high += step_size; in TAUupdate()
93 pr_debug("%s: high threshold crossed\n", __func__); in TAUupdate()
99 * TAU interrupts - called when we have a thermal assist unit interrupt
127 size = tau[cpu].high - tau[cpu].low; in tau_timeout()
130 shrink = (2 + size - min_window) / 4; in tau_timeout()
132 tau[cpu].low += shrink; in tau_timeout()
133 tau[cpu].high -= shrink; in tau_timeout()
135 tau[cpu].low += 1; in tau_timeout()
137 if ((tau[cpu].high - tau[cpu].low) != min_window){ in tau_timeout()
162 /* schedule ourselves to be run again */ in tau_work_func()
171 * Set things up to use THRM1 as a temperature lower bound, and THRM2 as an upper bound.
181 /* set these to a reasonable value and let the timer shrink the in TAU_init_smp()
183 tau[cpu].low = 5; in TAU_init_smp()
184 tau[cpu].high = 120; in TAU_init_smp()
192 * all have it --BenH in TAU_init()
201 !strcmp(cur_cpu_spec->platform, "ppc750"); in TAU_init()
205 return -ENOMEM; in TAU_init()
226 return ((tau[cpu].high << 16) | tau[cpu].low); in cpu_temp_both()
231 return ((tau[cpu].high + tau[cpu].low) / 2); in cpu_temp()