diff options
| -rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index afdd7c08d0fc..2813ea0f142e 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
| @@ -3324,13 +3324,13 @@ __init int intel_pmu_init(void) | |||
| 3324 | * counter, so do not extend mask to generic counters | 3324 | * counter, so do not extend mask to generic counters |
| 3325 | */ | 3325 | */ |
| 3326 | for_each_event_constraint(c, x86_pmu.event_constraints) { | 3326 | for_each_event_constraint(c, x86_pmu.event_constraints) { |
| 3327 | if (c->cmask != FIXED_EVENT_FLAGS | 3327 | if (c->cmask == FIXED_EVENT_FLAGS |
| 3328 | || c->idxmsk64 == INTEL_PMC_MSK_FIXED_REF_CYCLES) { | 3328 | && c->idxmsk64 != INTEL_PMC_MSK_FIXED_REF_CYCLES) { |
| 3329 | continue; | 3329 | c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1; |
| 3330 | } | 3330 | } |
| 3331 | 3331 | c->idxmsk64 &= | |
| 3332 | c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1; | 3332 | ~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed)); |
| 3333 | c->weight += x86_pmu.num_counters; | 3333 | c->weight = hweight64(c->idxmsk64); |
| 3334 | } | 3334 | } |
| 3335 | } | 3335 | } |
| 3336 | 3336 | ||
