Lines Matching full:cu
138 int cu; in do_read_registers_on_cu() local
144 cu = topology_core_id(smp_processor_id()); in do_read_registers_on_cu()
146 rdmsrl_safe(MSR_F15H_CU_PWR_ACCUMULATOR, &data->cu_acc_power[cu]); in do_read_registers_on_cu()
147 rdmsrl_safe(MSR_F15H_PTSC, &data->cpu_sw_pwr_ptsc[cu]); in do_read_registers_on_cu()
149 data->cu_on[cu] = 1; in do_read_registers_on_cu()
205 int cu, cu_num, ret; in power1_average_show() local
218 for (cu = 0; cu < cu_num; cu++) { in power1_average_show()
219 prev_cu_acc_power[cu] = data->cu_acc_power[cu]; in power1_average_show()
220 prev_ptsc[cu] = data->cpu_sw_pwr_ptsc[cu]; in power1_average_show()
231 for (cu = 0, avg_acc = 0; cu < cu_num; cu++) { in power1_average_show()
233 if (data->cu_on[cu] == 0) in power1_average_show()
236 if (data->cu_acc_power[cu] < prev_cu_acc_power[cu]) { in power1_average_show()
237 jdelta[cu] = data->max_cu_acc_power + data->cu_acc_power[cu]; in power1_average_show()
238 jdelta[cu] -= prev_cu_acc_power[cu]; in power1_average_show()
240 jdelta[cu] = data->cu_acc_power[cu] - prev_cu_acc_power[cu]; in power1_average_show()
242 tdelta = data->cpu_sw_pwr_ptsc[cu] - prev_ptsc[cu]; in power1_average_show()
243 jdelta[cu] *= data->cpu_pwr_sample_ratio * 1000; in power1_average_show()
244 do_div(jdelta[cu], tdelta); in power1_average_show()
247 avg_acc += jdelta[cu]; in power1_average_show()