Lines Matching refs:pxpt

48     struct pm_px *pxpt = per_cpu(cpufreq_statistic_data, cpu);  in cpufreq_residency_update()  local
53 delta = (now - pxpt->prev_state_wall) - in cpufreq_residency_update()
54 (total_idle_ns - pxpt->prev_idle_wall); in cpufreq_residency_update()
57 pxpt->u.pt[state].residency += delta; in cpufreq_residency_update()
59 pxpt->prev_state_wall = now; in cpufreq_residency_update()
60 pxpt->prev_idle_wall = total_idle_ns; in cpufreq_residency_update()
65 struct pm_px *pxpt; in cpufreq_statistic_update() local
72 pxpt = per_cpu(cpufreq_statistic_data, cpu); in cpufreq_statistic_update()
73 if ( !pxpt || !pmpt ) { in cpufreq_statistic_update()
78 pxpt->u.last = from; in cpufreq_statistic_update()
79 pxpt->u.cur = to; in cpufreq_statistic_update()
80 pxpt->u.pt[to].count++; in cpufreq_statistic_update()
84 (*(pxpt->u.trans_pt + from * pmpt->perf.state_count + to))++; in cpufreq_statistic_update()
92 struct pm_px *pxpt; in cpufreq_statistic_init() local
104 pxpt = per_cpu(cpufreq_statistic_data, cpuid); in cpufreq_statistic_init()
105 if ( pxpt ) { in cpufreq_statistic_init()
112 pxpt = xzalloc(struct pm_px); in cpufreq_statistic_init()
113 if ( !pxpt ) { in cpufreq_statistic_init()
117 per_cpu(cpufreq_statistic_data, cpuid) = pxpt; in cpufreq_statistic_init()
119 pxpt->u.trans_pt = xzalloc_array(uint64_t, count * count); in cpufreq_statistic_init()
120 if (!pxpt->u.trans_pt) { in cpufreq_statistic_init()
121 xfree(pxpt); in cpufreq_statistic_init()
126 pxpt->u.pt = xzalloc_array(struct pm_px_val, count); in cpufreq_statistic_init()
127 if (!pxpt->u.pt) { in cpufreq_statistic_init()
128 xfree(pxpt->u.trans_pt); in cpufreq_statistic_init()
129 xfree(pxpt); in cpufreq_statistic_init()
134 pxpt->u.total = pmpt->perf.state_count; in cpufreq_statistic_init()
135 pxpt->u.usable = pmpt->perf.state_count - pmpt->perf.platform_limit; in cpufreq_statistic_init()
138 pxpt->u.pt[i].freq = pmpt->perf.states[i].core_frequency; in cpufreq_statistic_init()
140 pxpt->prev_state_wall = NOW(); in cpufreq_statistic_init()
141 pxpt->prev_idle_wall = get_cpu_idle_time(cpuid); in cpufreq_statistic_init()
150 struct pm_px *pxpt; in cpufreq_statistic_exit() local
156 pxpt = per_cpu(cpufreq_statistic_data, cpuid); in cpufreq_statistic_exit()
157 if (!pxpt) { in cpufreq_statistic_exit()
162 xfree(pxpt->u.trans_pt); in cpufreq_statistic_exit()
163 xfree(pxpt->u.pt); in cpufreq_statistic_exit()
164 xfree(pxpt); in cpufreq_statistic_exit()
173 struct pm_px *pxpt; in cpufreq_statistic_reset() local
180 pxpt = per_cpu(cpufreq_statistic_data, cpuid); in cpufreq_statistic_reset()
181 if ( !pmpt || !pxpt || !pxpt->u.pt || !pxpt->u.trans_pt ) { in cpufreq_statistic_reset()
189 pxpt->u.pt[i].residency = 0; in cpufreq_statistic_reset()
190 pxpt->u.pt[i].count = 0; in cpufreq_statistic_reset()
193 *(pxpt->u.trans_pt + i*count + j) = 0; in cpufreq_statistic_reset()
196 pxpt->prev_state_wall = NOW(); in cpufreq_statistic_reset()
197 pxpt->prev_idle_wall = get_cpu_idle_time(cpuid); in cpufreq_statistic_reset()