Lines Matching full:cpu

60  * Per-CPU data structure for TSCs.
70 tsc_allocate_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused, in tsc_allocate_pmc()
74 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_allocate_pmc()
75 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_allocate_pmc()
90 tsc_config_pmc(int cpu, int ri, struct pmc *pm) in tsc_config_pmc() argument
94 PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); in tsc_config_pmc()
96 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_config_pmc()
97 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_config_pmc()
100 phw = &tsc_pcpu[cpu]->tc_hw; in tsc_config_pmc()
112 tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) in tsc_describe() argument
117 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_describe()
118 ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); in tsc_describe()
121 phw = &tsc_pcpu[cpu]->tc_hw; in tsc_describe()
139 tsc_get_config(int cpu, int ri __diagused, struct pmc **ppm) in tsc_get_config() argument
142 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_get_config()
143 ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); in tsc_get_config()
146 *ppm = tsc_pcpu[cpu]->tc_hw.phw_pmc; in tsc_get_config()
164 tsc_pcpu_fini(struct pmc_mdep *md, int cpu) in tsc_pcpu_fini() argument
169 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_pcpu_fini()
170 ("[tsc,%d] illegal cpu %d", __LINE__, cpu)); in tsc_pcpu_fini()
171 KASSERT(tsc_pcpu[cpu] != NULL, ("[tsc,%d] null pcpu", __LINE__)); in tsc_pcpu_fini()
173 free(tsc_pcpu[cpu], M_PMC); in tsc_pcpu_fini()
174 tsc_pcpu[cpu] = NULL; in tsc_pcpu_fini()
178 pc = pmc_pcpu[cpu]; in tsc_pcpu_fini()
185 tsc_pcpu_init(struct pmc_mdep *md, int cpu) in tsc_pcpu_init() argument
192 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_pcpu_init()
193 ("[tsc,%d] illegal cpu %d", __LINE__, cpu)); in tsc_pcpu_init()
195 KASSERT(tsc_pcpu[cpu] == NULL, ("[tsc,%d] non-null per-cpu", in tsc_pcpu_init()
201 PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(0) | in tsc_pcpu_init()
204 tsc_pcpu[cpu] = tsc_pc; in tsc_pcpu_init()
210 pc = pmc_pcpu[cpu]; in tsc_pcpu_init()
212 KASSERT(pc, ("[tsc,%d] null generic per-cpu", __LINE__)); in tsc_pcpu_init()
220 tsc_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) in tsc_read_pmc() argument
224 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_read_pmc()
225 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_read_pmc()
241 tsc_release_pmc(int cpu, int ri __diagused, struct pmc *pmc __unused) in tsc_release_pmc() argument
245 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_release_pmc()
246 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_release_pmc()
250 phw = &tsc_pcpu[cpu]->tc_hw; in tsc_release_pmc()
262 tsc_start_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused) in tsc_start_pmc()
265 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_start_pmc()
266 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_start_pmc()
273 tsc_stop_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused) in tsc_stop_pmc()
276 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_stop_pmc()
277 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_stop_pmc()
284 tsc_write_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused, in tsc_write_pmc()
288 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), in tsc_write_pmc()
289 ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); in tsc_write_pmc()
344 KASSERT(tsc_pcpu[i] == NULL, ("[tsc,%d] non-null pcpu cpu %d", in pmc_tsc_finalize()