Skip to content

Commit 6e316f9

Browse files
deateringomolnar
authored andcommitted
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>
1 parent 2cc9e58 commit 6e316f9

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎arch/blackfin/kernel/perf_event.c‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,6 @@ static int bfin_pmu_event_init(struct perf_event *event)
389389
if (attr->exclude_hv || attr->exclude_idle)
390390
return -EPERM;
391391

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-
400392
ret = 0;
401393
switch (attr->type) {
402394
case PERF_TYPE_RAW:
@@ -490,6 +482,13 @@ static int __init bfin_pmu_init(void)
490482
{
491483
int ret;
492484

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+
493492
ret = perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW);
494493
if (!ret)
495494
perf_cpu_notifier(bfin_pmu_notifier);

0 commit comments

Comments
 (0)