aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/perf/hv-24x7.c6
-rw-r--r--arch/powerpc/perf/hv-gpci.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index e0766b82e165..66d0f179650f 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -387,8 +387,7 @@ static int h_24x7_event_init(struct perf_event *event)
387 event->attr.exclude_hv || 387 event->attr.exclude_hv ||
388 event->attr.exclude_idle || 388 event->attr.exclude_idle ||
389 event->attr.exclude_host || 389 event->attr.exclude_host ||
390 event->attr.exclude_guest || 390 event->attr.exclude_guest)
391 is_sampling_event(event)) /* no sampling */
392 return -EINVAL; 391 return -EINVAL;
393 392
394 /* no branch sampling */ 393 /* no branch sampling */
@@ -513,6 +512,9 @@ static int hv_24x7_init(void)
513 if (!hv_page_cache) 512 if (!hv_page_cache)
514 return -ENOMEM; 513 return -ENOMEM;
515 514
515 /* sampling not supported */
516 h_24x7_pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
517
516 r = perf_pmu_register(&h_24x7_pmu, h_24x7_pmu.name, -1); 518 r = perf_pmu_register(&h_24x7_pmu, h_24x7_pmu.name, -1);
517 if (r) 519 if (r)
518 return r; 520 return r;
diff --git a/arch/powerpc/perf/hv-gpci.c b/arch/powerpc/perf/hv-gpci.c
index c9d399a2df82..15fc76c93022 100644
--- a/arch/powerpc/perf/hv-gpci.c
+++ b/arch/powerpc/perf/hv-gpci.c
@@ -210,8 +210,7 @@ static int h_gpci_event_init(struct perf_event *event)
210 event->attr.exclude_hv || 210 event->attr.exclude_hv ||
211 event->attr.exclude_idle || 211 event->attr.exclude_idle ||
212 event->attr.exclude_host || 212 event->attr.exclude_host ||
213 event->attr.exclude_guest || 213 event->attr.exclude_guest)
214 is_sampling_event(event)) /* no sampling */
215 return -EINVAL; 214 return -EINVAL;
216 215
217 /* no branch sampling */ 216 /* no branch sampling */
@@ -284,6 +283,9 @@ static int hv_gpci_init(void)
284 return -ENODEV; 283 return -ENODEV;
285 } 284 }
286 285
286 /* sampling not supported */
287 h_gpci_pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
288
287 r = perf_pmu_register(&h_gpci_pmu, h_gpci_pmu.name, -1); 289 r = perf_pmu_register(&h_gpci_pmu, h_gpci_pmu.name, -1);
288 if (r) 290 if (r)
289 return r; 291 return r;