Lines Matching refs:pmc
86 int pmc, sh, unit;
89 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK;
90 if (pmc) {
91 if (pmc > 6)
93 sh = (pmc - 1) * 2;
96 if (pmc >= 5 && !(event == 0x500fa || event == 0x600f4))
99 if (pmc < 5) {
146 int pmc, psel;
149 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK;
151 if ((pmc == 2 || pmc == 4) && (psel & ~7) == 0x40)
153 if ((pmc == 1 || pmc == 3) && (psel & ~7) == 0x48)
215 int pmc, psel;
218 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK;
221 if (pmc >= 5)
226 return pmc == 2 || pmc == 4;
229 return pmc == 1;
231 return pmc != 2;
238 return pmc >= 3;
252 unsigned int pmc, unit, combine, l2sel, psel;
258 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK;
259 if (pmc) {
260 if (pmc > 6)
262 if (pmc_inuse & (1 << (pmc - 1)))
264 pmc_inuse |= 1 << (pmc - 1);
270 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK;
275 if (!pmc) {
277 for (pmc = 0; pmc < 4; ++pmc) {
278 if (!(pmc_inuse & (1 << pmc)))
281 if (pmc >= 4)
283 pmc_inuse |= 1 << pmc;
286 --pmc;
288 if (pmc <= 3) {
290 << (MMCR1_TTM0SEL_SH - 4 * pmc);
292 << (MMCR1_PMC1_COMBINE_SH - pmc);
293 mmcr1 |= psel << MMCR1_PMCSEL_SH(pmc);
300 hwc[i] = pmc;
314 static void power7_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr)
316 if (pmc <= 3)
317 mmcr->mmcr1 &= ~(0xffUL << MMCR1_PMCSEL_SH(pmc));