diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index c6e31f6c3d7d..21bd9952e99c 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -603,7 +603,8 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, if (n != 1) return (-1); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || - cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2) { + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME) { if (KWMATCH(p, IAP_KW_SNOOPRESPONSE)) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); @@ -2273,6 +2274,7 @@ pmc_event_names_of_class(enum pmc_class cl, const char ***eventnames, count = PMC_EVENT_TABLE_SIZE(core); break; case PMC_CPU_INTEL_CORE2: + case PMC_CPU_INTEL_CORE2EXTREME: ev = core2_event_table; count = PMC_EVENT_TABLE_SIZE(core2); break; @@ -2455,6 +2457,7 @@ pmc_init(void) pmc_class_table[n] = &core_class_table_descr; break; case PMC_CPU_INTEL_CORE2: + case PMC_CPU_INTEL_CORE2EXTREME: PMC_MDEP_INIT(core2); pmc_class_table[n++] = &iaf_class_table_descr; pmc_class_table[n] = &core2_class_table_descr; @@ -2553,6 +2556,7 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype cpu) evfence = core_event_table + PMC_EVENT_TABLE_SIZE(core); break; case PMC_CPU_INTEL_CORE2: + case PMC_CPU_INTEL_CORE2EXTREME: ev = core2_event_table; evfence = core2_event_table + PMC_EVENT_TABLE_SIZE(core2); break; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index f6214f5895d6..c34a96993d00 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -527,8 +527,8 @@ struct iap_event_descr { }; #define IAP_F_CC (1 << 0) /* CPU: Core */ -#define IAP_F_CC2 (1 << 1) /* CPU: Core2 */ -#define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme */ +#define IAP_F_CC2 (1 << 1) /* CPU: Core2 family */ +#define IAP_F_CC2E (1 << 2) /* CPU: Core2 Extreme only */ #define IAP_F_CA (1 << 3) /* CPU: Atom */ #define IAP_F_FM (1 << 4) /* Fixed mask */ @@ -1111,7 +1111,7 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, cpuflag = IAP_F_CC2; break; case PMC_CPU_INTEL_CORE2EXTREME: - cpuflag = IAP_F_CC2E; + cpuflag = IAP_F_CC2 | IAP_F_CC2E; break; } diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c index 7532559b2891..49031c343dc7 100644 --- a/sys/dev/hwpmc/hwpmc_intel.c +++ b/sys/dev/hwpmc/hwpmc_intel.c @@ -168,6 +168,7 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: + case PMC_CPU_INTEL_CORE2EXTREME: error = pmc_core_initialize(pmc_mdep, ncpus); break; @@ -238,6 +239,7 @@ pmc_intel_finalize(struct pmc_mdep *md) case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: + case PMC_CPU_INTEL_CORE2EXTREME: pmc_core_finalize(md); break;