Lines Matching full:cpu

35 #include <machine/cpu.h>
83 * Per-CPU data structure.
95 soft_allocate_pmc(int cpu, int ri, struct pmc *pm, in soft_allocate_pmc() argument
101 (void) cpu; in soft_allocate_pmc()
103 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_allocate_pmc()
104 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_allocate_pmc()
134 soft_config_pmc(int cpu, int ri, struct pmc *pm) in soft_config_pmc() argument
138 PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); in soft_config_pmc()
140 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_config_pmc()
141 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_config_pmc()
145 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_config_pmc()
157 soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in soft_describe() argument
162 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_describe()
163 ("[soft,%d] illegal CPU %d", __LINE__, cpu)); in soft_describe()
167 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_describe()
185 soft_get_config(int cpu, int ri, struct pmc **ppm) in soft_get_config() argument
189 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_get_config()
190 ("[soft,%d] illegal CPU %d", __LINE__, cpu)); in soft_get_config()
194 *ppm = soft_pcpu[cpu]->soft_hw[ri].phw_pmc; in soft_get_config()
199 soft_pcpu_fini(struct pmc_mdep *md, int cpu) in soft_pcpu_fini() argument
204 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_pcpu_fini()
205 ("[soft,%d] illegal cpu %d", __LINE__, cpu)); in soft_pcpu_fini()
206 KASSERT(soft_pcpu[cpu] != NULL, ("[soft,%d] null pcpu", __LINE__)); in soft_pcpu_fini()
208 free(soft_pcpu[cpu], M_PMC); in soft_pcpu_fini()
209 soft_pcpu[cpu] = NULL; in soft_pcpu_fini()
216 pc = pmc_pcpu[cpu]; in soft_pcpu_fini()
223 soft_pcpu_init(struct pmc_mdep *md, int cpu) in soft_pcpu_init() argument
231 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_pcpu_init()
232 ("[soft,%d] illegal cpu %d", __LINE__, cpu)); in soft_pcpu_init()
234 KASSERT(soft_pcpu[cpu] == NULL, ("[soft,%d] non-null per-cpu", in soft_pcpu_init()
238 pc = pmc_pcpu[cpu]; in soft_pcpu_init()
240 KASSERT(pc != NULL, ("[soft,%d] cpu %d null per-cpu", __LINE__, cpu)); in soft_pcpu_init()
242 soft_pcpu[cpu] = soft_pc; in soft_pcpu_init()
248 PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(n); in soft_pcpu_init()
257 soft_read_pmc(int cpu, int ri, struct pmc *pm __unused, pmc_value_t *v) in soft_read_pmc() argument
260 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_read_pmc()
261 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_read_pmc()
267 *v = soft_pcpu[cpu]->soft_values[ri]; in soft_read_pmc()
273 soft_write_pmc(int cpu, int ri, struct pmc *pm __unused, pmc_value_t v) in soft_write_pmc() argument
275 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_write_pmc()
276 ("[soft,%d] illegal cpu value %d", __LINE__, cpu)); in soft_write_pmc()
280 PMCDBG3(MDP,WRI,1, "soft-write cpu=%d ri=%d v=%jx", cpu, ri, v); in soft_write_pmc()
282 soft_pcpu[cpu]->soft_values[ri] = v; in soft_write_pmc()
288 soft_release_pmc(int cpu, int ri, struct pmc *pmc) in soft_release_pmc() argument
296 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_release_pmc()
297 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_release_pmc()
301 phw = &soft_pcpu[cpu]->soft_hw[ri]; in soft_release_pmc()
320 soft_start_pmc(int cpu, int ri, struct pmc *pm) in soft_start_pmc() argument
324 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_start_pmc()
325 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_start_pmc()
339 soft_stop_pmc(int cpu, int ri, struct pmc *pm) in soft_stop_pmc() argument
343 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in soft_stop_pmc()
344 ("[soft,%d] illegal CPU value %d", __LINE__, cpu)); in soft_stop_pmc()
366 ("[soft,%d] CPU %d out of range", __LINE__, ks->pm_cpu)); in pmc_soft_intr()
461 KASSERT(soft_pcpu[i] == NULL, ("[soft,%d] non-null pcpu cpu %d", in pmc_soft_finalize()