Lines Matching refs:cpu
52 void set_thresholds(unsigned long cpu) in set_thresholds() argument
59 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID); in set_thresholds()
64 mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE); in set_thresholds()
67 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TID); in set_thresholds()
68 mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V); in set_thresholds()
72 void TAUupdate(int cpu) in TAUupdate() argument
84 if (tau[cpu].low >= step_size){ in TAUupdate()
85 tau[cpu].low -= step_size; in TAUupdate()
86 tau[cpu].high -= (step_size - window_expand); in TAUupdate()
88 tau[cpu].grew = 1; in TAUupdate()
96 if (tau[cpu].high <= 127-step_size){ in TAUupdate()
97 tau[cpu].low += (step_size - window_expand); in TAUupdate()
98 tau[cpu].high += step_size; in TAUupdate()
100 tau[cpu].grew = 1; in TAUupdate()
108 printk("grew = %d\n", tau[cpu].grew); in TAUupdate()
112 set_thresholds(cpu); in TAUupdate()
125 int cpu = smp_processor_id(); in TAUException() local
128 tau[cpu].interrupts++; in TAUException()
130 TAUupdate(cpu); in TAUException()
138 int cpu; in tau_timeout() local
145 cpu = smp_processor_id(); in tau_timeout()
148 TAUupdate(cpu); in tau_timeout()
151 size = tau[cpu].high - tau[cpu].low; in tau_timeout()
152 if (size > min_window && ! tau[cpu].grew) { in tau_timeout()
156 tau[cpu].low += shrink; in tau_timeout()
157 tau[cpu].high -= shrink; in tau_timeout()
159 tau[cpu].low += 1; in tau_timeout()
161 if ((tau[cpu].high - tau[cpu].low) != min_window){ in tau_timeout()
168 tau[cpu].grew = 0; in tau_timeout()
170 set_thresholds(cpu); in tau_timeout()
209 unsigned long cpu = smp_processor_id(); in TAU_init_smp() local
213 tau[cpu].low = 5; in TAU_init_smp()
214 tau[cpu].high = 120; in TAU_init_smp()
216 set_thresholds(cpu); in TAU_init_smp()
257 u32 cpu_temp_both(unsigned long cpu) in cpu_temp_both() argument
259 return ((tau[cpu].high << 16) | tau[cpu].low); in cpu_temp_both()
262 int cpu_temp(unsigned long cpu) in cpu_temp() argument
264 return ((tau[cpu].high + tau[cpu].low) / 2); in cpu_temp()
267 int tau_interrupts(unsigned long cpu) in tau_interrupts() argument
269 return (tau[cpu].interrupts); in tau_interrupts()