diff options
-rw-r--r-- | arch/x86/events/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 019c5887b698..1635c0c8df23 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c | |||
@@ -505,6 +505,10 @@ int x86_pmu_hw_config(struct perf_event *event) | |||
505 | 505 | ||
506 | if (event->attr.precise_ip > precise) | 506 | if (event->attr.precise_ip > precise) |
507 | return -EOPNOTSUPP; | 507 | return -EOPNOTSUPP; |
508 | |||
509 | /* There's no sense in having PEBS for non sampling events: */ | ||
510 | if (!is_sampling_event(event)) | ||
511 | return -EINVAL; | ||
508 | } | 512 | } |
509 | /* | 513 | /* |
510 | * check that PEBS LBR correction does not conflict with | 514 | * check that PEBS LBR correction does not conflict with |