aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorVince Weaver <vincent.weaver@maine.edu>2014-06-15 02:01:58 -0400
committerIngo Molnar <mingo@kernel.org>2014-06-18 12:43:45 -0400
commit6e316f9c19a088586fd9ae058f9ea35b271571f3 (patch)
tree9218e397a23408cacd2bc1d4e8261fd5d9434af3 /arch/blackfin/kernel
parent2cc9e588b0ff80c209c59a3e369c73e591535ba8 (diff)
blackfin, 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> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Steven Miao <realmz6@gmail.com> Cc: adi-buildroot-devel@lists.sourceforge.net Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1406150200360.16738@vincent-weaver-1.umelst.maine.edu Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/perf_event.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/blackfin/kernel/perf_event.c b/arch/blackfin/kernel/perf_event.c
index 974e55496db3..ea2032013cc2 100644
--- a/arch/blackfin/kernel/perf_event.c
+++ b/arch/blackfin/kernel/perf_event.c
@@ -389,14 +389,6 @@ static int bfin_pmu_event_init(struct perf_event *event)
389 if (attr->exclude_hv || attr->exclude_idle) 389 if (attr->exclude_hv || attr->exclude_idle)
390 return -EPERM; 390 return -EPERM;
391 391
392 /*
393 * All of the on-chip counters are "limited", in that they have
394 * no interrupts, and are therefore unable to do sampling without
395 * further work and timer assistance.
396 */
397 if (hwc->sample_period)
398 return -EINVAL;
399
400 ret = 0; 392 ret = 0;
401 switch (attr->type) { 393 switch (attr->type) {
402 case PERF_TYPE_RAW: 394 case PERF_TYPE_RAW:
@@ -490,6 +482,13 @@ static int __init bfin_pmu_init(void)
490{ 482{
491 int ret; 483 int ret;
492 484
485 /*
486 * All of the on-chip counters are "limited", in that they have
487 * no interrupts, and are therefore unable to do sampling without
488 * further work and timer assistance.
489 */
490 pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
491
493 ret = perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW); 492 ret = perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW);
494 if (!ret) 493 if (!ret)
495 perf_cpu_notifier(bfin_pmu_notifier); 494 perf_cpu_notifier(bfin_pmu_notifier);