Skip to content

Commit

Permalink
arc, perf: Use common PMU interrupt disabled code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Vineet Gupta <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Rob Herring <[email protected]>
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1406150159280.16738@vincent-weaver-1.umelst.maine.edu
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
deater authored and Ingo Molnar committed Jun 18, 2014
1 parent cf23091 commit 2cc9e58
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arch/arc/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ static int arc_pmu_event_init(struct perf_event *event)
struct hw_perf_event *hwc = &event->hw;
int ret;

/* ARC 700 PMU does not support sampling events */
if (is_sampling_event(event))
return -ENOENT;

switch (event->attr.type) {
case PERF_TYPE_HARDWARE:
if (event->attr.config >= PERF_COUNT_HW_MAX)
Expand Down Expand Up @@ -298,6 +294,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
.read = arc_pmu_read,
};

/* ARC 700 PMU does not support sampling events */
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;

ret = perf_pmu_register(&arc_pmu->pmu, pdev->name, PERF_TYPE_RAW);

return ret;
Expand Down

0 comments on commit 2cc9e58

Please sign in to comment.