Lines Matching refs:cpu
56 static void set_thresholds(unsigned long cpu) in set_thresholds() argument
63 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID); in set_thresholds()
68 mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE); in set_thresholds()
71 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TID); in set_thresholds()
72 mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V); in set_thresholds()
76 static void TAUupdate(int cpu) in TAUupdate() argument
88 if (tau[cpu].low >= step_size){ in TAUupdate()
89 tau[cpu].low -= step_size; in TAUupdate()
90 tau[cpu].high -= (step_size - window_expand); in TAUupdate()
92 tau[cpu].grew = 1; in TAUupdate()
100 if (tau[cpu].high <= 127-step_size){ in TAUupdate()
101 tau[cpu].low += (step_size - window_expand); in TAUupdate()
102 tau[cpu].high += step_size; in TAUupdate()
104 tau[cpu].grew = 1; in TAUupdate()
112 printk("grew = %d\n", tau[cpu].grew); in TAUupdate()
116 set_thresholds(cpu); in TAUupdate()
129 int cpu = smp_processor_id(); in TAUException() local
132 tau[cpu].interrupts++; in TAUException()
134 TAUupdate(cpu); in TAUException()
142 int cpu; in tau_timeout() local
149 cpu = smp_processor_id(); in tau_timeout()
152 TAUupdate(cpu); in tau_timeout()
155 size = tau[cpu].high - tau[cpu].low; in tau_timeout()
156 if (size > min_window && ! tau[cpu].grew) { in tau_timeout()
160 tau[cpu].low += shrink; in tau_timeout()
161 tau[cpu].high -= shrink; in tau_timeout()
163 tau[cpu].low += 1; in tau_timeout()
165 if ((tau[cpu].high - tau[cpu].low) != min_window){ in tau_timeout()
172 tau[cpu].grew = 0; in tau_timeout()
174 set_thresholds(cpu); in tau_timeout()
213 unsigned long cpu = smp_processor_id(); in TAU_init_smp() local
217 tau[cpu].low = 5; in TAU_init_smp()
218 tau[cpu].high = 120; in TAU_init_smp()
220 set_thresholds(cpu); in TAU_init_smp()
260 u32 cpu_temp_both(unsigned long cpu) in cpu_temp_both() argument
262 return ((tau[cpu].high << 16) | tau[cpu].low); in cpu_temp_both()
265 u32 cpu_temp(unsigned long cpu) in cpu_temp() argument
267 return ((tau[cpu].high + tau[cpu].low) / 2); in cpu_temp()
270 u32 tau_interrupts(unsigned long cpu) in tau_interrupts() argument
272 return (tau[cpu].interrupts); in tau_interrupts()