libpmc: Fix INVERT flag mapping for both Intel and AMD.

Looks like somebody's trivial copy/paste bug.

MFC after:	1 month

(cherry picked from commit 037dd0a967)
This commit is contained in:
Alexander Motin 2022-05-31 00:02:06 -04:00
parent b8ef2ca9ea
commit 0cd1f9831c

View file

@ -503,7 +503,7 @@ pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm,
if (ped->ped_edge)
amd->pm_amd_config |= AMD_PMC_EDGE;
if (ped->ped_inv)
amd->pm_amd_config |= AMD_PMC_EDGE;
amd->pm_amd_config |= AMD_PMC_INVERT;
if (pm->pm_caps & PMC_CAP_INTERRUPT)
amd->pm_amd_config |= AMD_PMC_INT;
}
@ -546,7 +546,7 @@ pmc_pmu_intel_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm,
if (ped->ped_any)
iap->pm_iap_config |= IAP_ANY;
if (ped->ped_inv)
iap->pm_iap_config |= IAP_EDGE;
iap->pm_iap_config |= IAP_INV;
if (pm->pm_caps & PMC_CAP_INTERRUPT)
iap->pm_iap_config |= IAP_INT;
return (0);