Lines Matching refs:cpu

55 static void set_thresholds(unsigned long cpu)  in set_thresholds()  argument
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()
66 static void TAUupdate(int cpu) in TAUupdate() argument
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()
81 tau[cpu].grew = 1; 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()
92 tau[cpu].grew = 1; in TAUupdate()
105 int cpu = smp_processor_id(); in DEFINE_INTERRUPT_HANDLER_ASYNC() local
107 tau[cpu].interrupts++; in DEFINE_INTERRUPT_HANDLER_ASYNC()
109 TAUupdate(cpu); in DEFINE_INTERRUPT_HANDLER_ASYNC()
115 int cpu; in tau_timeout() local
119 cpu = smp_processor_id(); in tau_timeout()
122 TAUupdate(cpu); in tau_timeout()
127 size = tau[cpu].high - tau[cpu].low; in tau_timeout()
128 if (size > min_window && ! tau[cpu].grew) { 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()
144 tau[cpu].grew = 0; in tau_timeout()
146 set_thresholds(cpu); in tau_timeout()
179 unsigned long cpu = smp_processor_id(); in TAU_init_smp() local
183 tau[cpu].low = 5; in TAU_init_smp()
184 tau[cpu].high = 120; in TAU_init_smp()
186 set_thresholds(cpu); in TAU_init_smp()
224 u32 cpu_temp_both(unsigned long cpu) in cpu_temp_both() argument
226 return ((tau[cpu].high << 16) | tau[cpu].low); in cpu_temp_both()
229 u32 cpu_temp(unsigned long cpu) in cpu_temp() argument
231 return ((tau[cpu].high + tau[cpu].low) / 2); in cpu_temp()
234 u32 tau_interrupts(unsigned long cpu) in tau_interrupts() argument
236 return (tau[cpu].interrupts); in tau_interrupts()