diff options
author | Vince Weaver <vincent.weaver@maine.edu> | 2014-06-19 14:40:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-05 05:21:51 -0400 |
commit | cc56d673a9902aecd1c03bea6479eaff6de6967a (patch) | |
tree | 71e3ed1830d06cbbca978c60fe6ea5d7d6b40339 /arch/powerpc/perf | |
parent | 1c92f88542faa3ae4f970c548b4fe8275a45201b (diff) |
powerpc, perf: Use common PMU interrupt disabled code
Transition to using the new generic PERF_PMU_CAP_NO_INTERRUPT method for
failing a sampling event when no PMU interrupt is available.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1406191435440.27913@vincent-weaver-1.umelst.maine.edu
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/powerpc/perf')
-rw-r--r-- | arch/powerpc/perf/hv-24x7.c | 6 | ||||
-rw-r--r-- | arch/powerpc/perf/hv-gpci.c | 6 |
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; |