Lines Matching refs:pmc

220 	int pmc, psel, unit, byte, bit;  in p4_marked_instr_event()  local
223 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p4_marked_instr_event()
225 if (pmc) { in p4_marked_instr_event()
226 if (direct_marked_event[pmc - 1] & (1 << psel)) in p4_marked_instr_event()
229 bit = (pmc <= 4)? pmc - 1: 8 - pmc; in p4_marked_instr_event()
257 int pmc, byte, unit, lower, sh; in p4_get_constraint() local
261 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in p4_get_constraint()
262 if (pmc) { in p4_get_constraint()
263 if (pmc > 8) in p4_get_constraint()
265 sh = (pmc - 1) * 2; in p4_get_constraint()
268 grp = ((pmc - 1) >> 1) & 1; in p4_get_constraint()
279 if (!pmc) in p4_get_constraint()
314 if (pmc && (event & PM_PMCSEL_MSK) == 6 && byte == 2) in p4_get_constraint()
362 unsigned int pmc, unit, byte, psel, lower; in p4_compute_mmcr() local
379 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p4_compute_mmcr()
380 if (pmc) { in p4_compute_mmcr()
381 if (pmc_inuse & (1 << (pmc - 1))) in p4_compute_mmcr()
383 pmc_inuse |= 1 << (pmc - 1); in p4_compute_mmcr()
385 ++pmc_grp_use[((pmc - 1) >> 1) & 1]; in p4_compute_mmcr()
391 if (!pmc) in p4_compute_mmcr()
471 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p4_compute_mmcr()
475 if (!pmc) { in p4_compute_mmcr()
479 for (pmc = 0; pmc < 8; ++pmc) { in p4_compute_mmcr()
480 if (pmc_inuse & (1 << pmc)) in p4_compute_mmcr()
482 grp = (pmc >> 1) & 1; in p4_compute_mmcr()
491 pmc_inuse |= 1 << pmc; in p4_compute_mmcr()
494 --pmc; in p4_compute_mmcr()
497 mmcr1 |= 1ull << mmcr1_adder_bits[pmc]; in p4_compute_mmcr()
503 if (pmc <= 1) in p4_compute_mmcr()
504 mmcr0 |= psel << (MMCR0_PMC1SEL_SH - 7 * pmc); in p4_compute_mmcr()
506 mmcr1 |= psel << (MMCR1_PMC3SEL_SH - 5 * (pmc - 2)); in p4_compute_mmcr()
507 if (pmc == 7) /* PMC8 */ in p4_compute_mmcr()
509 hwc[i] = pmc; in p4_compute_mmcr()
528 static void p4_disable_pmc(unsigned int pmc, unsigned long mmcr[]) in p4_disable_pmc() argument
534 if (pmc <= 1) { in p4_disable_pmc()
535 mmcr[0] &= ~(0x1fUL << (MMCR0_PMC1SEL_SH - 7 * pmc)); in p4_disable_pmc()
537 mmcr[1] &= ~(0x1fUL << (MMCR1_PMC3SEL_SH - 5 * (pmc - 2))); in p4_disable_pmc()
538 if (pmc == 7) in p4_disable_pmc()