diff options
Diffstat (limited to 'arch/powerpc/perf/core-book3s.c')
-rw-r--r-- | arch/powerpc/perf/core-book3s.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 89bd59365c07..069f92b31992 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c | |||
@@ -880,8 +880,16 @@ static int power_pmu_add(struct perf_event *event, int ef_flags) | |||
880 | cpuhw->events[n0] = event->hw.config; | 880 | cpuhw->events[n0] = event->hw.config; |
881 | cpuhw->flags[n0] = event->hw.event_base; | 881 | cpuhw->flags[n0] = event->hw.event_base; |
882 | 882 | ||
883 | /* | ||
884 | * This event may have been disabled/stopped in record_and_restart() | ||
885 | * because we exceeded the ->event_limit. If re-starting the event, | ||
886 | * clear the ->hw.state (STOPPED and UPTODATE flags), so the user | ||
887 | * notification is re-enabled. | ||
888 | */ | ||
883 | if (!(ef_flags & PERF_EF_START)) | 889 | if (!(ef_flags & PERF_EF_START)) |
884 | event->hw.state = PERF_HES_STOPPED | PERF_HES_UPTODATE; | 890 | event->hw.state = PERF_HES_STOPPED | PERF_HES_UPTODATE; |
891 | else | ||
892 | event->hw.state = 0; | ||
885 | 893 | ||
886 | /* | 894 | /* |
887 | * If group events scheduling transaction was started, | 895 | * If group events scheduling transaction was started, |