• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/hwpmc/

Lines Matching defs:cpu

38 #include <machine/cpu.h>
98 soft_allocate_pmc(int cpu, int ri, struct pmc *pm,
104 (void) cpu;
106 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
107 ("[soft,%d] illegal CPU value %d", __LINE__, cpu));
137 soft_config_pmc(int cpu, int ri, struct pmc *pm)
141 PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm);
143 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
144 ("[soft,%d] illegal CPU value %d", __LINE__, cpu));
148 phw = &soft_pcpu[cpu]->soft_hw[ri];
160 soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc)
167 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
168 ("[soft,%d] illegal CPU %d", __LINE__, cpu));
172 phw = &soft_pcpu[cpu]->soft_hw[ri];
193 soft_get_config(int cpu, int ri, struct pmc **ppm)
197 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
198 ("[soft,%d] illegal CPU %d", __LINE__, cpu));
202 *ppm = soft_pcpu[cpu]->soft_hw[ri].phw_pmc;
207 soft_pcpu_fini(struct pmc_mdep *md, int cpu)
212 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
213 ("[soft,%d] illegal cpu %d", __LINE__, cpu));
214 KASSERT(soft_pcpu[cpu] != NULL, ("[soft,%d] null pcpu", __LINE__));
216 free(soft_pcpu[cpu], M_PMC);
217 soft_pcpu[cpu] = NULL;
224 pc = pmc_pcpu[cpu];
231 soft_pcpu_init(struct pmc_mdep *md, int cpu)
239 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
240 ("[soft,%d] illegal cpu %d", __LINE__, cpu));
242 KASSERT(soft_pcpu[cpu] == NULL, ("[soft,%d] non-null per-cpu",
246 pc = pmc_pcpu[cpu];
248 KASSERT(pc != NULL, ("[soft,%d] cpu %d null per-cpu", __LINE__, cpu));
250 soft_pcpu[cpu] = soft_pc;
256 PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(n);
265 soft_read_pmc(int cpu, int ri, pmc_value_t *v)
270 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
271 ("[soft,%d] illegal CPU value %d", __LINE__, cpu));
275 phw = &soft_pcpu[cpu]->soft_hw[ri];
279 ("[soft,%d] no owner for PHW [cpu%d,pmc%d]", __LINE__, cpu, ri));
283 *v = soft_pcpu[cpu]->soft_values[ri];
289 soft_write_pmc(int cpu, int ri, pmc_value_t v)
294 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
295 ("[soft,%d] illegal cpu value %d", __LINE__, cpu));
299 pm = soft_pcpu[cpu]->soft_hw[ri].phw_pmc;
303 ("[soft,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, ri));
305 PMCDBG3(MDP,WRI,1, "soft-write cpu=%d ri=%d v=%jx", cpu, ri, v);
307 soft_pcpu[cpu]->soft_values[ri] = v;
313 soft_release_pmc(int cpu, int ri, struct pmc *pmc)
321 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
322 ("[soft,%d] illegal CPU value %d", __LINE__, cpu));
326 phw = &soft_pcpu[cpu]->soft_hw[ri];
345 soft_start_pmc(int cpu, int ri)
351 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
352 ("[soft,%d] illegal CPU value %d", __LINE__, cpu));
356 pc = soft_pcpu[cpu];
360 ("[soft,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, ri));
372 soft_stop_pmc(int cpu, int ri)
378 KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
379 ("[soft,%d] illegal CPU value %d", __LINE__, cpu));
383 pc = soft_pcpu[cpu];
387 ("[soft,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, ri));
492 KASSERT(soft_pcpu[i] == NULL, ("[soft,%d] non-null pcpu cpu %d",