Lines Matching full:pmc

18 #define PM_PMC_SH	20	/* PMC number (1-based) for direct events */
141 int pmc, byte, unit, sh; in power5_get_constraint() local
146 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5_get_constraint()
147 if (pmc) { in power5_get_constraint()
148 if (pmc > 6) in power5_get_constraint()
150 sh = (pmc - 1) * 2; in power5_get_constraint()
153 if (pmc <= 4) in power5_get_constraint()
154 grp = (pmc - 1) >> 1; in power5_get_constraint()
186 if (!pmc) in power5_get_constraint()
201 if (pmc < 5) { in power5_get_constraint()
240 /* PMC 1 */ { 0x21, 0x23, 0x25, 0x27 },
241 /* PMC 2 */ { 0x07, 0x17, 0x0e, 0x1e },
242 /* PMC 3 */ { 0x20, 0x22, 0x24, 0x26 },
243 /* PMC 4 */ { 0x07, 0x17, 0x0e, 0x1e }
253 int pmc, altpmc, pp, j; in find_alternative_bdecode() local
255 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in find_alternative_bdecode()
256 if (pmc == 0 || pmc > 4) in find_alternative_bdecode()
258 altpmc = 5 - pmc; /* 1 <-> 4, 2 <-> 3 */ in find_alternative_bdecode()
261 if (bytedecode_alternatives[pmc - 1][j] == pp) { in find_alternative_bdecode()
294 * Indexed by PMCSEL value, bit i (LE) set if PMC i is a marked event.
341 int pmc, psel; in power5_marked_instr_event() local
345 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5_marked_instr_event()
347 if (pmc >= 5) in power5_marked_instr_event()
352 if (direct_event_is_marked[psel] & (1 << pmc)) in power5_marked_instr_event()
357 bit = pmc - 1; in power5_marked_instr_event()
359 bit = 4 - pmc; in power5_marked_instr_event()
360 else if (psel == 0x1b && (pmc == 1 || pmc == 3)) in power5_marked_instr_event()
389 unsigned int pmc, unit, byte, psel; in power5_compute_mmcr() local
406 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in power5_compute_mmcr()
407 if (pmc) { in power5_compute_mmcr()
408 if (pmc > 6) in power5_compute_mmcr()
410 if (pmc_inuse & (1 << (pmc - 1))) in power5_compute_mmcr()
412 pmc_inuse |= 1 << (pmc - 1); in power5_compute_mmcr()
414 if (pmc <= 4) in power5_compute_mmcr()
415 ++pmc_grp_use[(pmc - 1) >> 1]; in power5_compute_mmcr()
430 if (!pmc) in power5_compute_mmcr()
491 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in power5_compute_mmcr()
496 if (!pmc) { in power5_compute_mmcr()
497 /* Bus event or any-PMC direct event */ in power5_compute_mmcr()
498 for (pmc = 0; pmc < 4; ++pmc) { in power5_compute_mmcr()
499 if (pmc_inuse & (1 << pmc)) in power5_compute_mmcr()
501 grp = (pmc >> 1) & 1; in power5_compute_mmcr()
510 pmc_inuse |= 1 << pmc; in power5_compute_mmcr()
511 } else if (pmc <= 4) { in power5_compute_mmcr()
513 --pmc; in power5_compute_mmcr()
516 mmcr1 |= 1ul << (MMCR1_PMC1_ADDER_SEL_SH - pmc); in power5_compute_mmcr()
519 --pmc; in power5_compute_mmcr()
528 if (pmc <= 3) in power5_compute_mmcr()
529 mmcr1 |= psel << MMCR1_PMCSEL_SH(pmc); in power5_compute_mmcr()
530 hwc[i] = pmc; in power5_compute_mmcr()
544 static void power5_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr) in power5_disable_pmc() argument
546 if (pmc <= 3) in power5_disable_pmc()
547 mmcr->mmcr1 &= ~(0x7fUL << MMCR1_PMCSEL_SH(pmc)); in power5_disable_pmc()