diff options
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 045cc0bb4c17..1d665a0b202c 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -835,6 +835,10 @@ void hw_perf_enable(void) | |||
835 | event = cpuc->event_list[i]; | 835 | event = cpuc->event_list[i]; |
836 | hwc = &event->hw; | 836 | hwc = &event->hw; |
837 | 837 | ||
838 | if (i < n_running && | ||
839 | match_prev_assignment(hwc, cpuc, i)) | ||
840 | continue; | ||
841 | |||
838 | if (hwc->idx == -1) | 842 | if (hwc->idx == -1) |
839 | x86_assign_hw_event(event, cpuc, i); | 843 | x86_assign_hw_event(event, cpuc, i); |
840 | 844 | ||