hwpmc: don't incrorrectly strip the ANY flag

This commit is contained in:
Matt Macy 2018-05-29 04:04:06 +00:00
parent 9958932695
commit 23c01e5b57

View File

@ -256,13 +256,6 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm,
validflags = IAF_MASK;
if (core_cputype != PMC_CPU_INTEL_ATOM &&
core_cputype != PMC_CPU_INTEL_ATOM_SILVERMONT)
validflags &= ~IAF_ANY;
if ((flags & ~validflags) != 0)
return (EINVAL);
if (caps & PMC_CAP_INTERRUPT)
flags |= IAF_PMI;
if (caps & PMC_CAP_SYSTEM)
@ -446,10 +439,6 @@ iaf_stop_pmc(int cpu, int ri)
fc = (IAF_MASK << (ri * 4));
if (core_cputype != PMC_CPU_INTEL_ATOM &&
core_cputype != PMC_CPU_INTEL_ATOM_SILVERMONT)
fc &= ~IAF_ANY;
iafc->pc_iafctrl &= ~fc;
PMCDBG1(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl);