diff options
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index fd8011ed4dcd..8ed44589b0e4 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -2808,7 +2808,7 @@ uncore_get_event_constraint(struct intel_uncore_box *box, struct perf_event *eve | |||
2808 | return c; | 2808 | return c; |
2809 | } | 2809 | } |
2810 | 2810 | ||
2811 | if (event->hw.config == ~0ULL) | 2811 | if (event->attr.config == UNCORE_FIXED_EVENT) |
2812 | return &constraint_fixed; | 2812 | return &constraint_fixed; |
2813 | 2813 | ||
2814 | if (type->constraints) { | 2814 | if (type->constraints) { |
@@ -3112,7 +3112,9 @@ static int uncore_pmu_event_init(struct perf_event *event) | |||
3112 | */ | 3112 | */ |
3113 | if (pmu->type->single_fixed && pmu->pmu_idx > 0) | 3113 | if (pmu->type->single_fixed && pmu->pmu_idx > 0) |
3114 | return -EINVAL; | 3114 | return -EINVAL; |
3115 | hwc->config = ~0ULL; | 3115 | |
3116 | /* fixed counters have event field hardcoded to zero */ | ||
3117 | hwc->config = 0ULL; | ||
3116 | } else { | 3118 | } else { |
3117 | hwc->config = event->attr.config & pmu->type->event_mask; | 3119 | hwc->config = event->attr.config & pmu->type->event_mask; |
3118 | if (pmu->type->ops->hw_config) { | 3120 | if (pmu->type->ops->hw_config) { |