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;
253 unsigned int pmc, unit, combine, l2sel, psel;
259 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK;
260 if (pmc) {
261 if (pmc > 6)
263 if (pmc_inuse & (1 << (pmc - 1)))
265 pmc_inuse |= 1 << (pmc - 1);
271 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK;
276 if (!pmc) {
278 for (pmc = 0; pmc < 4; ++pmc) {
279 if (!(pmc_inuse & (1 << pmc)))
282 if (pmc >= 4)
284 pmc_inuse |= 1 << pmc;
287 --pmc;
289 if (pmc <= 3) {
291 << (MMCR1_TTM0SEL_SH - 4 * pmc);
293 << (MMCR1_PMC1_COMBINE_SH - pmc);
294 mmcr1 |= psel << MMCR1_PMCSEL_SH(pmc);
301 hwc[i] = pmc;
315 static void power7_disable_pmc(unsigned int pmc, struct mmcr_regs *mmcr)
317 if (pmc <= 3)
318 mmcr->mmcr1 &= ~(0xffUL << MMCR1_PMCSEL_SH(pmc));