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.
268 u32 ev, pmc, thresh; in mpc7450_compute_mmcr() local
289 pmc = (ev >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_compute_mmcr()
290 if (pmc_inuse & (1 << (pmc - 1))) in mpc7450_compute_mmcr()
293 /* Find a suitable PMC */ in mpc7450_compute_mmcr()
297 pmc = ffs(pmc_avail); in mpc7450_compute_mmcr()
299 pmc_inuse |= 1 << (pmc - 1); in mpc7450_compute_mmcr()
308 ev &= pmcsel_mask[pmc - 1]; in mpc7450_compute_mmcr()
309 ev <<= pmcsel_shift[pmc - 1]; in mpc7450_compute_mmcr()
310 if (pmc <= 2) in mpc7450_compute_mmcr()
314 hwc[event_index[class][i]] = pmc - 1; in mpc7450_compute_mmcr()
338 * Disable counting by a PMC.
339 * Note that the pmc argument is 0-based here, not 1-based.
341 static void mpc7450_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr) in mpc7450_disable_pmc() argument
343 if (pmc <= 1) in mpc7450_disable_pmc()
344 mmcr->mmcr0 &= ~(pmcsel_mask[pmc] << pmcsel_shift[pmc]); in mpc7450_disable_pmc()
346 mmcr->mmcr1 &= ~(pmcsel_mask[pmc] << pmcsel_shift[pmc]); in mpc7450_disable_pmc()