Lines Matching refs:pmc
147 int pmc, psel, unit, byte, bit; in p970_marked_instr_event() local
150 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p970_marked_instr_event()
152 if (pmc) { in p970_marked_instr_event()
153 if (direct_marked_event[pmc - 1] & (1 << psel)) in p970_marked_instr_event()
156 bit = (pmc <= 4)? pmc - 1: 8 - pmc; in p970_marked_instr_event()
195 int pmc, byte, unit, sh, spcsel; in p970_get_constraint() local
199 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p970_get_constraint()
200 if (pmc) { in p970_get_constraint()
201 if (pmc > 8) in p970_get_constraint()
203 sh = (pmc - 1) * 2; in p970_get_constraint()
206 grp = ((pmc - 1) >> 1) & 1; in p970_get_constraint()
219 if (!pmc) in p970_get_constraint()
262 unsigned int pmc, unit, byte, psel; in p970_compute_mmcr() local
282 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p970_compute_mmcr()
283 if (pmc) { in p970_compute_mmcr()
284 if (pmc_inuse & (1 << (pmc - 1))) in p970_compute_mmcr()
286 pmc_inuse |= 1 << (pmc - 1); in p970_compute_mmcr()
288 ++pmc_grp_use[((pmc - 1) >> 1) & 1]; in p970_compute_mmcr()
295 if (!pmc) in p970_compute_mmcr()
349 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p970_compute_mmcr()
353 if (!pmc) { in p970_compute_mmcr()
359 for (pmc = 0; pmc < 8; ++pmc) { in p970_compute_mmcr()
360 if (pmc_inuse & (1 << pmc)) in p970_compute_mmcr()
362 grp = (pmc >> 1) & 1; in p970_compute_mmcr()
371 pmc_inuse |= 1 << pmc; in p970_compute_mmcr()
374 --pmc; in p970_compute_mmcr()
377 mmcr1 |= 1ull << mmcr1_adder_bits[pmc]; in p970_compute_mmcr()
379 pmcsel[pmc] = psel; in p970_compute_mmcr()
380 hwc[i] = pmc; in p970_compute_mmcr()
386 for (pmc = 0; pmc < 2; ++pmc) in p970_compute_mmcr()
387 mmcr0 |= pmcsel[pmc] << (MMCR0_PMC1SEL_SH - 7 * pmc); in p970_compute_mmcr()
388 for (; pmc < 8; ++pmc) in p970_compute_mmcr()
389 mmcr1 |= (unsigned long)pmcsel[pmc] in p970_compute_mmcr()
390 << (MMCR1_PMC3SEL_SH - 5 * (pmc - 2)); in p970_compute_mmcr()
405 static void p970_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr) in p970_disable_pmc() argument
412 if (pmc <= 1) { in p970_disable_pmc()
413 shift = MMCR0_PMC1SEL_SH - 7 * pmc; in p970_disable_pmc()
416 shift = MMCR1_PMC3SEL_SH - 5 * (pmc - 2); in p970_disable_pmc()