Lines Matching full:pmc
26 * Classify events according to how specific their PMC requirements are.
28 * 0: can go on any PMC
32 * 4: can only go on one PMC
39 int pmc; in mpc7450_classify_event() local
41 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_classify_event()
42 if (pmc) { in mpc7450_classify_event()
43 if (pmc > N_COUNTER) in mpc7450_classify_event()
79 int pmc, sel; in mpc7450_threshold_use() local
81 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_threshold_use()
83 switch (pmc) { in mpc7450_threshold_use()
153 int pmc, class; in mpc7450_get_constraint() local
161 pmc = ((unsigned int)event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_get_constraint()
162 mask = pmcbits[pmc - 1][0]; in mpc7450_get_constraint()
163 value = pmcbits[pmc - 1][1]; in mpc7450_get_constraint()
242 * Bit i is set if PMC i+1 is usable.
269 u32 ev, pmc, thresh; in mpc7450_compute_mmcr() local
290 pmc = (ev >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_compute_mmcr()
291 if (pmc_inuse & (1 << (pmc - 1))) in mpc7450_compute_mmcr()
294 /* Find a suitable PMC */ in mpc7450_compute_mmcr()
298 pmc = ffs(pmc_avail); in mpc7450_compute_mmcr()
300 pmc_inuse |= 1 << (pmc - 1); in mpc7450_compute_mmcr()
309 ev &= pmcsel_mask[pmc - 1]; in mpc7450_compute_mmcr()
310 ev <<= pmcsel_shift[pmc - 1]; in mpc7450_compute_mmcr()
311 if (pmc <= 2) in mpc7450_compute_mmcr()
315 hwc[event_index[class][i]] = pmc - 1; in mpc7450_compute_mmcr()
339 * Disable counting by a PMC.
340 * Note that the pmc argument is 0-based here, not 1-based.
342 static void mpc7450_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr) in mpc7450_disable_pmc() argument
344 if (pmc <= 1) in mpc7450_disable_pmc()
345 mmcr->mmcr0 &= ~(pmcsel_mask[pmc] << pmcsel_shift[pmc]); in mpc7450_disable_pmc()
347 mmcr->mmcr1 &= ~(pmcsel_mask[pmc] << pmcsel_shift[pmc]); in mpc7450_disable_pmc()