Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hwpmc/hwpmc_e500.c
Show First 20 Lines • Show All 370 Lines • ▼ Show 20 Lines | e500_allocate_pmc(int cpu, int ri, struct pmc *pm, | ||||
uint16_t vers; | uint16_t vers; | ||||
uint8_t pe_cpu_mask; | uint8_t pe_cpu_mask; | ||||
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), | KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), | ||||
("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); | ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); | ||||
KASSERT(ri >= 0 && ri < E500_MAX_PMCS, | KASSERT(ri >= 0 && ri < E500_MAX_PMCS, | ||||
("[powerpc,%d] illegal row index %d", __LINE__, ri)); | ("[powerpc,%d] illegal row index %d", __LINE__, ri)); | ||||
if (a->pm_class != PMC_CLASS_E500) | |||||
return (EINVAL); | |||||
caps = a->pm_caps; | caps = a->pm_caps; | ||||
pe = a->pm_ev; | pe = a->pm_ev; | ||||
config = PMLCax_FCS | PMLCax_FCU | | config = PMLCax_FCS | PMLCax_FCU | | ||||
PMLCax_FCM1 | PMLCax_FCM1; | PMLCax_FCM1 | PMLCax_FCM1; | ||||
if (pe < PMC_EV_E500_FIRST || pe > PMC_EV_E500_LAST) | if (pe < PMC_EV_E500_FIRST || pe > PMC_EV_E500_LAST) | ||||
return (EINVAL); | return (EINVAL); | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |