Lines Matching refs:cpu

96 soft_allocate_pmc(int cpu, int ri, struct pmc *pm,  in soft_allocate_pmc()  argument
102 (void) cpu; in soft_allocate_pmc()
104 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_allocate_pmc()
105 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_allocate_pmc()
135 soft_config_pmc(int cpu, int ri, struct pmc *pm) in soft_config_pmc() argument
139 PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); in soft_config_pmc()
141 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_config_pmc()
142 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_config_pmc()
146 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_config_pmc()
158 soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in soft_describe() argument
163 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_describe()
164 ("[soft,%d] illegal CPU %d", __LINE__, cpu)); in soft_describe()
168 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_describe()
186 soft_get_config(int cpu, int ri, struct pmc **ppm) in soft_get_config() argument
190 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_get_config()
191 ("[soft,%d] illegal CPU %d", __LINE__, cpu)); in soft_get_config()
195 *ppm = soft_pcpu[cpu]->soft_hw[ri].phw_pmc; in soft_get_config()
200 soft_pcpu_fini(struct pmc_mdep *md, int cpu) in soft_pcpu_fini() argument
205 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_pcpu_fini()
206 ("[soft,%d] illegal cpu %d", __LINE__, cpu)); in soft_pcpu_fini()
207 KASSERT(soft_pcpu[cpu] != NULL, ("[soft,%d] null pcpu", __LINE__)); in soft_pcpu_fini()
209 free(soft_pcpu[cpu], M_PMC); in soft_pcpu_fini()
210 soft_pcpu[cpu] = NULL; in soft_pcpu_fini()
217 pc = pmc_pcpu[cpu]; in soft_pcpu_fini()
224 soft_pcpu_init(struct pmc_mdep *md, int cpu) in soft_pcpu_init() argument
232 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_pcpu_init()
233 ("[soft,%d] illegal cpu %d", __LINE__, cpu)); in soft_pcpu_init()
235 KASSERT(soft_pcpu[cpu] == NULL, ("[soft,%d] non-null per-cpu", in soft_pcpu_init()
239 pc = pmc_pcpu[cpu]; in soft_pcpu_init()
241 KASSERT(pc != NULL, ("[soft,%d] cpu %d null per-cpu", __LINE__, cpu)); in soft_pcpu_init()
243 soft_pcpu[cpu] = soft_pc; in soft_pcpu_init()
249 PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(n); in soft_pcpu_init()
258 soft_read_pmc(int cpu, int ri, struct pmc *pm __unused, pmc_value_t *v) in soft_read_pmc() argument
261 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_read_pmc()
262 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_read_pmc()
268 *v = soft_pcpu[cpu]->soft_values[ri]; in soft_read_pmc()
274 soft_write_pmc(int cpu, int ri, struct pmc *pm __unused, pmc_value_t v) in soft_write_pmc() argument
276 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_write_pmc()
277 ("[soft,%d] illegal cpu value %d", __LINE__, cpu)); in soft_write_pmc()
281 PMCDBG3(MDP,WRI,1, "soft-write cpu=%d ri=%d v=%jx", cpu, ri, v); in soft_write_pmc()
283 soft_pcpu[cpu]->soft_values[ri] = v; in soft_write_pmc()
289 soft_release_pmc(int cpu, int ri, struct pmc *pmc) in soft_release_pmc() argument
297 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_release_pmc()
298 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_release_pmc()
302 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_release_pmc()
321 soft_start_pmc(int cpu, int ri, struct pmc *pm) in soft_start_pmc() argument
325 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_start_pmc()
326 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_start_pmc()
340 soft_stop_pmc(int cpu, int ri, struct pmc *pm) in soft_stop_pmc() argument
344 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_stop_pmc()
345 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_stop_pmc()