summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2010-09-05 13:31:14 +0000
committerfabient <fabient@FreeBSD.org>2010-09-05 13:31:14 +0000
commitdd461c3739e3026d957917c95209144d72f5099e (patch)
tree61dd378bccda0f3805dc1efcfda6662cb9f51320 /sys/dev/hwpmc
parent4f9dee93a3dcb7d781a21fc8f8fa17c4de77b187 (diff)
downloadFreeBSD-src-dd461c3739e3026d957917c95209144d72f5099e.zip
FreeBSD-src-dd461c3739e3026d957917c95209144d72f5099e.tar.gz
Fix invalid class removal when IAF is not the last class.
Keep IAF class with 0 PMC and change the alias in libpmc to IAP. MFC after: 1 week
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r--sys/dev/hwpmc/hwpmc_core.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c
index 7c4476d..01bd482 100644
--- a/sys/dev/hwpmc/hwpmc_core.c
+++ b/sys/dev/hwpmc/hwpmc_core.c
@@ -2234,21 +2234,8 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu)
core_iaf_npmc = cpuid[CORE_CPUID_EDX] & 0x1F;
core_iaf_width = (cpuid[CORE_CPUID_EDX] >> 5) & 0xFF;
- if (core_iaf_npmc > 0) {
- iaf_initialize(md, maxcpu, core_iaf_npmc,
- core_iaf_width);
- core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) <<
- IAF_OFFSET;
- } else {
- /*
- * Adjust the number of classes exported to
- * user space.
- */
- md->pmd_nclass--;
- KASSERT(md->pmd_nclass == 2,
- ("[core,%d] unexpected nclass %d", __LINE__,
- md->pmd_nclass));
- }
+ iaf_initialize(md, maxcpu, core_iaf_npmc, core_iaf_width);
+ core_pmcmask |= ((1ULL << core_iaf_npmc) - 1) << IAF_OFFSET;
}
PMCDBG(MDP,INI,1,"core-init pmcmask=0x%jx iafri=%d", core_pmcmask,
OpenPOWER on IntegriCloud