Lines Matching full:pmc
17 #define PM_PMC_SH 12 /* PMC number (1-based) for direct events */
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()
263 unsigned int pmc, unit, byte, psel; in p970_compute_mmcr() local
283 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p970_compute_mmcr()
284 if (pmc) { in p970_compute_mmcr()
285 if (pmc_inuse & (1 << (pmc - 1))) in p970_compute_mmcr()
287 pmc_inuse |= 1 << (pmc - 1); in p970_compute_mmcr()
289 ++pmc_grp_use[((pmc - 1) >> 1) & 1]; in p970_compute_mmcr()
296 if (!pmc) in p970_compute_mmcr()
350 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p970_compute_mmcr()
354 if (!pmc) { in p970_compute_mmcr()
355 /* Bus event or any-PMC direct event */ in p970_compute_mmcr()
360 for (pmc = 0; pmc < 8; ++pmc) { in p970_compute_mmcr()
361 if (pmc_inuse & (1 << pmc)) in p970_compute_mmcr()
363 grp = (pmc >> 1) & 1; in p970_compute_mmcr()
372 pmc_inuse |= 1 << pmc; in p970_compute_mmcr()
375 --pmc; in p970_compute_mmcr()
378 mmcr1 |= 1ull << mmcr1_adder_bits[pmc]; in p970_compute_mmcr()
380 pmcsel[pmc] = psel; in p970_compute_mmcr()
381 hwc[i] = pmc; in p970_compute_mmcr()
387 for (pmc = 0; pmc < 2; ++pmc) in p970_compute_mmcr()
388 mmcr0 |= pmcsel[pmc] << (MMCR0_PMC1SEL_SH - 7 * pmc); in p970_compute_mmcr()
389 for (; pmc < 8; ++pmc) in p970_compute_mmcr()
390 mmcr1 |= (unsigned long)pmcsel[pmc] in p970_compute_mmcr()
391 << (MMCR1_PMC3SEL_SH - 5 * (pmc - 2)); in p970_compute_mmcr()
406 static void p970_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr) in p970_disable_pmc() argument
411 * Setting the PMCxSEL field to 0x08 disables PMC x. in p970_disable_pmc()
413 if (pmc <= 1) { in p970_disable_pmc()
414 shift = MMCR0_PMC1SEL_SH - 7 * pmc; in p970_disable_pmc()
417 shift = MMCR1_PMC3SEL_SH - 5 * (pmc - 2); in p970_disable_pmc()